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

Classes

class  EnOceanSwitch
 

Functions

None _migrate_to_new_unique_id (HomeAssistant hass, dev_id, channel)
 
None async_setup_platform (HomeAssistant hass, ConfigType config, AddEntitiesCallback async_add_entities, DiscoveryInfoType|None discovery_info=None)
 
str generate_unique_id (list[int] dev_id, int channel)
 

Variables

string CONF_CHANNEL = "channel"
 
string DEFAULT_NAME = "EnOcean Switch"
 
 PLATFORM_SCHEMA
 

Detailed Description

Support for EnOcean switches.

Function Documentation

◆ _migrate_to_new_unique_id()

None homeassistant.components.enocean.switch._migrate_to_new_unique_id ( HomeAssistant  hass,
  dev_id,
  channel 
)
private
Migrate old unique ids to new unique ids.

Definition at line 40 of file switch.py.

◆ async_setup_platform()

None homeassistant.components.enocean.switch.async_setup_platform ( HomeAssistant  hass,
ConfigType  config,
AddEntitiesCallback  async_add_entities,
DiscoveryInfoType | None   discovery_info = None 
)
Set up the EnOcean switch platform.

Definition at line 65 of file switch.py.

◆ generate_unique_id()

str homeassistant.components.enocean.switch.generate_unique_id ( list[int]  dev_id,
int  channel 
)
Generate a valid unique id.

Definition at line 35 of file switch.py.

Variable Documentation

◆ CONF_CHANNEL

string homeassistant.components.enocean.switch.CONF_CHANNEL = "channel"

Definition at line 23 of file switch.py.

◆ DEFAULT_NAME

string homeassistant.components.enocean.switch.DEFAULT_NAME = "EnOcean Switch"

Definition at line 24 of file switch.py.

◆ PLATFORM_SCHEMA

homeassistant.components.enocean.switch.PLATFORM_SCHEMA
Initial value:
1 = SWITCH_PLATFORM_SCHEMA.extend(
2  {
3  vol.Required(CONF_ID): vol.All(cv.ensure_list, [vol.Coerce(int)]),
4  vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
5  vol.Optional(CONF_CHANNEL, default=0): cv.positive_int,
6  }
7 )

Definition at line 26 of file switch.py.