Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.switch_as_x Namespace Reference

Namespaces

 config_flow
 
 const
 
 cover
 
 entity
 
 fan
 
 light
 
 lock
 
 siren
 
 valve
 

Functions

str|None async_add_to_device (HomeAssistant hass, ConfigEntry entry, str entity_id)
 
bool async_migrate_entry (HomeAssistant hass, ConfigEntry config_entry)
 
None async_remove_entry (HomeAssistant hass, ConfigEntry entry)
 
bool async_setup_entry (HomeAssistant hass, ConfigEntry entry)
 
bool async_unload_entry (HomeAssistant hass, ConfigEntry entry)
 
None config_entry_update_listener (HomeAssistant hass, ConfigEntry entry)
 

Variables

list __all__ = ["LightSwitch"]
 
 _LOGGER = logging.getLogger(__name__)
 

Detailed Description

Component to wrap switch entities in entities of other domains.

Function Documentation

◆ async_add_to_device()

str | None homeassistant.components.switch_as_x.async_add_to_device ( HomeAssistant  hass,
ConfigEntry  entry,
str   entity_id 
)
Add our config entry to the tracked entity's device.

Definition at line 25 of file __init__.py.

◆ async_migrate_entry()

bool homeassistant.components.switch_as_x.async_migrate_entry ( HomeAssistant  hass,
ConfigEntry  config_entry 
)
Migrate old entry.

Definition at line 104 of file __init__.py.

◆ async_remove_entry()

None homeassistant.components.switch_as_x.async_remove_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Unload a config entry.

This will unhide the wrapped entity and restore assistant expose settings.

Definition at line 142 of file __init__.py.

◆ async_setup_entry()

bool homeassistant.components.switch_as_x.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Set up a config entry.

Definition at line 45 of file __init__.py.

◆ async_unload_entry()

bool homeassistant.components.switch_as_x.async_unload_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Unload a config entry.

Definition at line 135 of file __init__.py.

◆ config_entry_update_listener()

None homeassistant.components.switch_as_x.config_entry_update_listener ( HomeAssistant  hass,
ConfigEntry  entry 
)
Update listener, called when the config entry options are changed.

Definition at line 130 of file __init__.py.

Variable Documentation

◆ __all__

list homeassistant.components.switch_as_x.__all__ = ["LightSwitch"]
private

Definition at line 19 of file __init__.py.

◆ _LOGGER

homeassistant.components.switch_as_x._LOGGER = logging.getLogger(__name__)
private

Definition at line 21 of file __init__.py.