Namespaces | |
| const | |
| device_action | |
| device_condition | |
| device_trigger | |
| light | |
| reproduce_state | |
| significant_change | |
Classes | |
| class | SwitchDeviceClass |
| class | SwitchEntity |
| class | SwitchEntityDescription |
Functions | |
| bool | async_setup (HomeAssistant hass, ConfigType config) |
| bool | async_setup_entry (HomeAssistant hass, ConfigEntry entry) |
| bool | async_unload_entry (HomeAssistant hass, ConfigEntry entry) |
| bool | is_on (HomeAssistant hass, str entity_id) |
Variables | |
| __all__ = all_with_deprecated_constants(globals()) | |
| __dir__ | |
| __getattr__ = partial(check_if_deprecated_constant, module_globals=globals()) | |
| _DEPRECATED_DEVICE_CLASS_OUTLET | |
| _DEPRECATED_DEVICE_CLASS_SWITCH | |
| _LOGGER = logging.getLogger(__name__) | |
| dictionary | CACHED_PROPERTIES_WITH_ATTR_ |
| list | DEVICE_CLASSES = [cls.value for cls in SwitchDeviceClass] |
| DEVICE_CLASSES_SCHEMA = vol.All(vol.Lower, vol.Coerce(SwitchDeviceClass)) | |
| string | ENTITY_ID_FORMAT = DOMAIN + ".{}" |
| MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10) | |
| PLATFORM_SCHEMA = cv.PLATFORM_SCHEMA | |
| PLATFORM_SCHEMA_BASE = cv.PLATFORM_SCHEMA_BASE | |
| SCAN_INTERVAL = timedelta(seconds=30) | |
Component to interface with switches that can be controlled remotely.
| bool homeassistant.components.switch.async_setup | ( | HomeAssistant | hass, |
| ConfigType | config | ||
| ) |
Track states and offer events for switches.
Definition at line 78 of file __init__.py.
| bool homeassistant.components.switch.async_setup_entry | ( | HomeAssistant | hass, |
| ConfigEntry | entry | ||
| ) |
Set up a config entry.
Definition at line 92 of file __init__.py.
| bool homeassistant.components.switch.async_unload_entry | ( | HomeAssistant | hass, |
| ConfigEntry | entry | ||
| ) |
Unload a config entry.
Definition at line 97 of file __init__.py.
| bool homeassistant.components.switch.is_on | ( | HomeAssistant | hass, |
| str | entity_id | ||
| ) |
Return if the switch is on based on the statemachine. Async friendly.
Definition at line 70 of file __init__.py.
|
private |
Definition at line 134 of file __init__.py.
|
private |
Definition at line 131 of file __init__.py.
|
private |
Definition at line 130 of file __init__.py.
|
private |
Definition at line 59 of file __init__.py.
|
private |
Definition at line 62 of file __init__.py.
|
private |
Definition at line 36 of file __init__.py.
| dictionary homeassistant.components.switch.CACHED_PROPERTIES_WITH_ATTR_ |
Definition at line 108 of file __init__.py.
| list homeassistant.components.switch.DEVICE_CLASSES = [cls.value for cls in SwitchDeviceClass] |
Definition at line 58 of file __init__.py.
| homeassistant.components.switch.DEVICE_CLASSES_SCHEMA = vol.All(vol.Lower, vol.Coerce(SwitchDeviceClass)) |
Definition at line 54 of file __init__.py.
| string homeassistant.components.switch.ENTITY_ID_FORMAT = DOMAIN + ".{}" |
Definition at line 39 of file __init__.py.
| homeassistant.components.switch.MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10) |
Definition at line 44 of file __init__.py.
| homeassistant.components.switch.PLATFORM_SCHEMA = cv.PLATFORM_SCHEMA |
Definition at line 40 of file __init__.py.
| homeassistant.components.switch.PLATFORM_SCHEMA_BASE = cv.PLATFORM_SCHEMA_BASE |
Definition at line 41 of file __init__.py.
| homeassistant.components.switch.SCAN_INTERVAL = timedelta(seconds=30) |
Definition at line 42 of file __init__.py.