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

Classes

class  ArestData
 
class  ArestSensor
 

Functions

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

Variables

 _LOGGER = logging.getLogger(__name__)
 
string CONF_FUNCTIONS = "functions"
 
string CONF_PINS = "pins"
 
string DEFAULT_NAME = "aREST sensor"
 
 MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=30)
 
 PIN_VARIABLE_SCHEMA
 
 PLATFORM_SCHEMA
 

Detailed Description

Support for an exposed aREST RESTful API of a device.

Function Documentation

◆ setup_platform()

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

Definition at line 61 of file sensor.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 30 of file sensor.py.

◆ CONF_FUNCTIONS

string homeassistant.components.arest.sensor.CONF_FUNCTIONS = "functions"

Definition at line 34 of file sensor.py.

◆ CONF_PINS

string homeassistant.components.arest.sensor.CONF_PINS = "pins"

Definition at line 35 of file sensor.py.

◆ DEFAULT_NAME

string homeassistant.components.arest.sensor.DEFAULT_NAME = "aREST sensor"

Definition at line 37 of file sensor.py.

◆ MIN_TIME_BETWEEN_UPDATES

homeassistant.components.arest.sensor.MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=30)

Definition at line 32 of file sensor.py.

◆ PIN_VARIABLE_SCHEMA

homeassistant.components.arest.sensor.PIN_VARIABLE_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  vol.Optional(CONF_NAME): cv.string,
4  vol.Optional(CONF_UNIT_OF_MEASUREMENT): cv.string,
5  vol.Optional(CONF_VALUE_TEMPLATE): cv.template,
6  }
7 )

Definition at line 39 of file sensor.py.

◆ PLATFORM_SCHEMA

homeassistant.components.arest.sensor.PLATFORM_SCHEMA
Initial value:
1 = SENSOR_PLATFORM_SCHEMA.extend(
2  {
3  vol.Required(CONF_RESOURCE): cv.url,
4  vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
5  vol.Optional(CONF_PINS, default={}): vol.Schema(
6  {cv.string: PIN_VARIABLE_SCHEMA}
7  ),
8  vol.Optional(CONF_MONITORED_VARIABLES, default={}): vol.Schema(
9  {cv.string: PIN_VARIABLE_SCHEMA}
10  ),
11  }
12 )

Definition at line 47 of file sensor.py.