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

Classes

class  CurrencylayerData
 
class  CurrencylayerSensor
 

Functions

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

Variables

 _LOGGER = logging.getLogger(__name__)
 
string _RESOURCE = "http://apilayer.net/api/live"
 
string DEFAULT_BASE = "USD"
 
string DEFAULT_NAME = "CurrencyLayer Sensor"
 
 PLATFORM_SCHEMA
 
 SCAN_INTERVAL = timedelta(hours=4)
 

Detailed Description

Support for currencylayer.com exchange rates service.

Function Documentation

◆ setup_platform()

None homeassistant.components.currencylayer.sensor.setup_platform ( HomeAssistant  hass,
ConfigType  config,
AddEntitiesCallback  add_entities,
DiscoveryInfoType | None   discovery_info = None 
)
Set up the Currencylayer sensor.

Definition at line 40 of file sensor.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 21 of file sensor.py.

◆ _RESOURCE

string homeassistant.components.currencylayer.sensor._RESOURCE = "http://apilayer.net/api/live"
private

Definition at line 22 of file sensor.py.

◆ DEFAULT_BASE

string homeassistant.components.currencylayer.sensor.DEFAULT_BASE = "USD"

Definition at line 24 of file sensor.py.

◆ DEFAULT_NAME

string homeassistant.components.currencylayer.sensor.DEFAULT_NAME = "CurrencyLayer Sensor"

Definition at line 25 of file sensor.py.

◆ PLATFORM_SCHEMA

homeassistant.components.currencylayer.sensor.PLATFORM_SCHEMA
Initial value:
1 = SENSOR_PLATFORM_SCHEMA.extend(
2  {
3  vol.Required(CONF_API_KEY): cv.string,
4  vol.Required(CONF_QUOTE): vol.All(cv.ensure_list, [cv.string]),
5  vol.Optional(CONF_BASE, default=DEFAULT_BASE): cv.string,
6  vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
7  }
8 )

Definition at line 30 of file sensor.py.

◆ SCAN_INTERVAL

homeassistant.components.currencylayer.sensor.SCAN_INTERVAL = timedelta(hours=4)

Definition at line 28 of file sensor.py.