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

Classes

class  BlockRelaySwitch
 
class  BlockSleepingMotionSwitch
 
class  BlockSwitchDescription
 
class  RpcRelaySwitch
 
class  RpcScriptSwitch
 
class  RpcSwitchDescription
 
class  RpcVirtualSwitch
 

Functions

None async_setup_block_entry (HomeAssistant hass, ShellyConfigEntry config_entry, AddEntitiesCallback async_add_entities)
 
None async_setup_entry (HomeAssistant hass, ShellyConfigEntry config_entry, AddEntitiesCallback async_add_entities)
 
None async_setup_rpc_entry (HomeAssistant hass, ShellyConfigEntry config_entry, AddEntitiesCallback async_add_entities)
 

Variables

 MOTION_SWITCH
 
 RPC_SCRIPT_SWITCH
 
 RPC_VIRTUAL_SWITCH
 

Detailed Description

Switch for Shelly.

Function Documentation

◆ async_setup_block_entry()

None homeassistant.components.shelly.switch.async_setup_block_entry ( HomeAssistant  hass,
ShellyConfigEntry  config_entry,
AddEntitiesCallback  async_add_entities 
)
Set up entities for block device.

Definition at line 90 of file switch.py.

◆ async_setup_entry()

None homeassistant.components.shelly.switch.async_setup_entry ( HomeAssistant  hass,
ShellyConfigEntry  config_entry,
AddEntitiesCallback  async_add_entities 
)
Set up switches for device.

Definition at line 77 of file switch.py.

◆ async_setup_rpc_entry()

None homeassistant.components.shelly.switch.async_setup_rpc_entry ( HomeAssistant  hass,
ShellyConfigEntry  config_entry,
AddEntitiesCallback  async_add_entities 
)
Set up entities for RPC device.

Definition at line 143 of file switch.py.

Variable Documentation

◆ MOTION_SWITCH

homeassistant.components.shelly.switch.MOTION_SWITCH
Initial value:
1 = BlockSwitchDescription(
2  key="sensor|motionActive",
3  name="Motion detection",
4  entity_category=EntityCategory.CONFIG,
5 )

Definition at line 52 of file switch.py.

◆ RPC_SCRIPT_SWITCH

homeassistant.components.shelly.switch.RPC_SCRIPT_SWITCH
Initial value:
1 = RpcSwitchDescription(
2  key="script",
3  sub_key="running",
4  entity_registry_enabled_default=False,
5  entity_category=EntityCategory.CONFIG,
6 )

Definition at line 69 of file switch.py.

◆ RPC_VIRTUAL_SWITCH

homeassistant.components.shelly.switch.RPC_VIRTUAL_SWITCH
Initial value:
1 = RpcSwitchDescription(
2  key="boolean",
3  sub_key="value",
4 )

Definition at line 64 of file switch.py.