1 """Support for LightwaveRF switches."""
3 from __future__
import annotations
13 from .
import LIGHTWAVE_LINK
19 async_add_entities: AddEntitiesCallback,
20 discovery_info: DiscoveryInfoType |
None =
None,
22 """Find and return LightWave switches."""
23 if not discovery_info:
27 lwlink = hass.data[LIGHTWAVE_LINK]
29 for device_id, device_config
in discovery_info.items():
30 name = device_config[CONF_NAME]
31 switches.append(
LWRFSwitch(name, device_id, lwlink))
37 """Representation of a LightWaveRF switch."""
39 _attr_should_poll =
False
42 """Initialize LWRFSwitch entity."""
48 """Turn the LightWave switch on."""
54 """Turn the LightWave switch off."""
def __init__(self, name, device_id, lwlink)
None async_turn_on(self, **Any kwargs)
None async_turn_off(self, **Any kwargs)
None async_write_ha_state(self)
None turn_off(self, **Any kwargs)
None async_setup_platform(HomeAssistant hass, ConfigType config, AddEntitiesCallback async_add_entities, DiscoveryInfoType|None discovery_info=None)