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

Classes

class  ArestSwitchBase
 
class  ArestSwitchFunction
 
class  ArestSwitchPin
 

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_INVERT = "invert"
 
string CONF_PINS = "pins"
 
string DEFAULT_NAME = "aREST switch"
 
 PIN_FUNCTION_SCHEMA
 
 PLATFORM_SCHEMA
 

Detailed Description

Support for an exposed aREST RESTful API of a device.

Function Documentation

◆ setup_platform()

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

Definition at line 51 of file switch.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 22 of file switch.py.

◆ CONF_FUNCTIONS

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

Definition at line 24 of file switch.py.

◆ CONF_INVERT

string homeassistant.components.arest.switch.CONF_INVERT = "invert"

Definition at line 26 of file switch.py.

◆ CONF_PINS

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

Definition at line 25 of file switch.py.

◆ DEFAULT_NAME

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

Definition at line 28 of file switch.py.

◆ PIN_FUNCTION_SCHEMA

homeassistant.components.arest.switch.PIN_FUNCTION_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  vol.Optional(CONF_NAME): cv.string,
4  vol.Optional(CONF_INVERT, default=False): cv.boolean,
5  }
6 )

Definition at line 30 of file switch.py.

◆ PLATFORM_SCHEMA

homeassistant.components.arest.switch.PLATFORM_SCHEMA
Initial value:
1 = SWITCH_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_FUNCTION_SCHEMA}
7  ),
8  vol.Optional(CONF_FUNCTIONS, default={}): vol.Schema(
9  {cv.string: PIN_FUNCTION_SCHEMA}
10  ),
11  }
12 )

Definition at line 37 of file switch.py.