Home Assistant Unofficial Reference 2024.12.1
__init__.py File Reference

Go to the source code of this file.

Classes

class  homeassistant.components.switch.SwitchDeviceClass
 
class  homeassistant.components.switch.SwitchEntity
 
class  homeassistant.components.switch.SwitchEntityDescription
 

Namespaces

 homeassistant.components.switch
 

Functions

bool homeassistant.components.switch.async_setup (HomeAssistant hass, ConfigType config)
 
bool homeassistant.components.switch.async_setup_entry (HomeAssistant hass, ConfigEntry entry)
 
bool homeassistant.components.switch.async_unload_entry (HomeAssistant hass, ConfigEntry entry)
 
bool homeassistant.components.switch.is_on (HomeAssistant hass, str entity_id)
 

Variables

 homeassistant.components.switch.__all__ = all_with_deprecated_constants(globals())
 
 homeassistant.components.switch.__dir__
 
 homeassistant.components.switch.__getattr__ = partial(check_if_deprecated_constant, module_globals=globals())
 
 homeassistant.components.switch._DEPRECATED_DEVICE_CLASS_OUTLET
 
 homeassistant.components.switch._DEPRECATED_DEVICE_CLASS_SWITCH
 
 homeassistant.components.switch._LOGGER = logging.getLogger(__name__)
 
dictionary homeassistant.components.switch.CACHED_PROPERTIES_WITH_ATTR_
 
list homeassistant.components.switch.DEVICE_CLASSES = [cls.value for cls in SwitchDeviceClass]
 
 homeassistant.components.switch.DEVICE_CLASSES_SCHEMA = vol.All(vol.Lower, vol.Coerce(SwitchDeviceClass))
 
string homeassistant.components.switch.ENTITY_ID_FORMAT = DOMAIN + ".{}"
 
 homeassistant.components.switch.MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10)
 
 homeassistant.components.switch.PLATFORM_SCHEMA = cv.PLATFORM_SCHEMA
 
 homeassistant.components.switch.PLATFORM_SCHEMA_BASE = cv.PLATFORM_SCHEMA_BASE
 
 homeassistant.components.switch.SCAN_INTERVAL = timedelta(seconds=30)