Add missing supported features to Z-Wave.Me siren (#87141)

pull/87221/head
Dmitry Vlasov 2023-02-02 12:36:38 +03:00 committed by Paulus Schoutsen
parent 517e89ab3c
commit 56a583e6ac
1 changed files with 8 additions and 1 deletions

View File

@ -1,7 +1,7 @@
"""Representation of a sirenBinary."""
from typing import Any
from homeassistant.components.siren import SirenEntity
from homeassistant.components.siren import SirenEntity, SirenEntityFeature
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
@ -41,6 +41,13 @@ async def async_setup_entry(
class ZWaveMeSiren(ZWaveMeEntity, SirenEntity):
"""Representation of a ZWaveMe siren."""
def __init__(self, controller, device):
"""Initialize the device."""
super().__init__(controller, device)
self._attr_supported_features = (
SirenEntityFeature.TURN_ON | SirenEntityFeature.TURN_OFF
)
@property
def is_on(self) -> bool:
"""Return the state of the siren."""