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

Classes

class  RestSensor
 

Functions

None async_setup_platform (HomeAssistant hass, ConfigType config, AddEntitiesCallback async_add_entities, DiscoveryInfoType|None discovery_info=None)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 PLATFORM_SCHEMA
 
tuple TRIGGER_ENTITY_OPTIONS
 

Detailed Description

Support for RESTful API sensors.

Function Documentation

◆ async_setup_platform()

None homeassistant.components.rest.sensor.async_setup_platform ( HomeAssistant  hass,
ConfigType  config,
AddEntitiesCallback  async_add_entities,
DiscoveryInfoType | None   discovery_info = None 
)
Set up the RESTful sensor.

Definition at line 68 of file sensor.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 50 of file sensor.py.

◆ PLATFORM_SCHEMA

homeassistant.components.rest.sensor.PLATFORM_SCHEMA
Initial value:
1 = vol.All(
2  SENSOR_PLATFORM_SCHEMA.extend({**RESOURCE_SCHEMA, **SENSOR_SCHEMA}),
3  cv.has_at_least_one_key(CONF_RESOURCE, CONF_RESOURCE_TEMPLATE),
4 )

Definition at line 52 of file sensor.py.

◆ TRIGGER_ENTITY_OPTIONS

tuple homeassistant.components.rest.sensor.TRIGGER_ENTITY_OPTIONS
Initial value:
1 = (
2  CONF_AVAILABILITY,
3  CONF_DEVICE_CLASS,
4  CONF_ICON,
5  CONF_PICTURE,
6  CONF_UNIQUE_ID,
7  CONF_STATE_CLASS,
8  CONF_UNIT_OF_MEASUREMENT,
9 )

Definition at line 57 of file sensor.py.