Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.starlingbank.sensor Namespace Reference

Classes

class  StarlingBalanceSensor
 

Functions

None setup_platform (HomeAssistant hass, ConfigType config, AddEntitiesCallback add_devices, DiscoveryInfoType|None discovery_info=None)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 ACCOUNT_SCHEMA
 
list BALANCE_TYPES = ["cleared_balance", "effective_balance"]
 
string CONF_ACCOUNTS = "accounts"
 
string CONF_BALANCE_TYPES = "balance_types"
 
string CONF_SANDBOX = "sandbox"
 
string DEFAULT_ACCOUNT_NAME = "Starling"
 
bool DEFAULT_SANDBOX = False
 
 PLATFORM_SCHEMA
 
 SCAN_INTERVAL = timedelta(seconds=180)
 

Detailed Description

Support for balance data via the Starling Bank API.

Function Documentation

◆ setup_platform()

None homeassistant.components.starlingbank.sensor.setup_platform ( HomeAssistant  hass,
ConfigType  config,
AddEntitiesCallback  add_devices,
DiscoveryInfoType | None   discovery_info = None 
)
Set up the Sterling Bank sensor platform.

Definition at line 52 of file sensor.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.starlingbank.sensor._LOGGER = logging.getLogger(__name__)
private

Definition at line 22 of file sensor.py.

◆ ACCOUNT_SCHEMA

homeassistant.components.starlingbank.sensor.ACCOUNT_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  vol.Required(CONF_ACCESS_TOKEN): cv.string,
4  vol.Optional(CONF_BALANCE_TYPES, default=BALANCE_TYPES): vol.All(
5  cv.ensure_list, [vol.In(BALANCE_TYPES)]
6  ),
7  vol.Optional(CONF_NAME, default=DEFAULT_ACCOUNT_NAME): cv.string,
8  vol.Optional(CONF_SANDBOX, default=DEFAULT_SANDBOX): cv.boolean,
9  }
10 )

Definition at line 36 of file sensor.py.

◆ BALANCE_TYPES

list homeassistant.components.starlingbank.sensor.BALANCE_TYPES = ["cleared_balance", "effective_balance"]

Definition at line 24 of file sensor.py.

◆ CONF_ACCOUNTS

string homeassistant.components.starlingbank.sensor.CONF_ACCOUNTS = "accounts"

Definition at line 26 of file sensor.py.

◆ CONF_BALANCE_TYPES

string homeassistant.components.starlingbank.sensor.CONF_BALANCE_TYPES = "balance_types"

Definition at line 27 of file sensor.py.

◆ CONF_SANDBOX

string homeassistant.components.starlingbank.sensor.CONF_SANDBOX = "sandbox"

Definition at line 28 of file sensor.py.

◆ DEFAULT_ACCOUNT_NAME

string homeassistant.components.starlingbank.sensor.DEFAULT_ACCOUNT_NAME = "Starling"

Definition at line 31 of file sensor.py.

◆ DEFAULT_SANDBOX

bool homeassistant.components.starlingbank.sensor.DEFAULT_SANDBOX = False

Definition at line 30 of file sensor.py.

◆ PLATFORM_SCHEMA

homeassistant.components.starlingbank.sensor.PLATFORM_SCHEMA
Initial value:
1 = SENSOR_PLATFORM_SCHEMA.extend(
2  {vol.Required(CONF_ACCOUNTS): vol.Schema([ACCOUNT_SCHEMA])}
3 )

Definition at line 47 of file sensor.py.

◆ SCAN_INTERVAL

homeassistant.components.starlingbank.sensor.SCAN_INTERVAL = timedelta(seconds=180)

Definition at line 34 of file sensor.py.