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

This commit is contained in:
Dmitry Vlasov 2023-02-02 12:36:38 +03:00 committed by GitHub
parent 58596d205c
commit 41b9994218
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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."""