1 """Representation of a sirenBinary."""
11 from .const
import DOMAIN, ZWaveMePlatform
12 from .entity
import ZWaveMeEntity
14 DEVICE_NAME = ZWaveMePlatform.SIREN
19 config_entry: ConfigEntry,
20 async_add_entities: AddEntitiesCallback,
22 """Set up the siren platform."""
26 controller = hass.data[DOMAIN][config_entry.entry_id]
35 config_entry.async_on_unload(
37 hass, f
"ZWAVE_ME_NEW_{DEVICE_NAME.upper()}", add_new_device
43 """Representation of a ZWaveMe siren."""
46 """Initialize the device."""
49 SirenEntityFeature.TURN_ON | SirenEntityFeature.TURN_OFF
54 """Return the state of the siren."""
55 return self.
devicedevice.level ==
"on"
58 """Turn the entity on."""
62 """Turn the entity off."""
63 self.
controllercontroller.zwave_api.send_command(self.
devicedevice.id,
"off")
def __init__(self, controller, device)
None turn_off(self, **Any kwargs)
None turn_on(self, **Any kwargs)
None async_setup_entry(HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities)
def add_new_device(new_device)
Callable[[], None] async_dispatcher_connect(HomeAssistant hass, str signal, Callable[..., Any] target)