diff --git a/homeassistant/components/demo/siren.py b/homeassistant/components/demo/siren.py index 9cf18a4c902..0720114861c 100644 --- a/homeassistant/components/demo/siren.py +++ b/homeassistant/components/demo/siren.py @@ -3,20 +3,13 @@ from __future__ import annotations from typing import Any -from homeassistant.components.siren import SirenEntity -from homeassistant.components.siren.const import ( - SUPPORT_DURATION, - SUPPORT_TONES, - SUPPORT_TURN_OFF, - SUPPORT_TURN_ON, - SUPPORT_VOLUME_SET, -) +from homeassistant.components.siren import SirenEntity, SirenEntityFeature from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType -SUPPORT_FLAGS = SUPPORT_TURN_OFF | SUPPORT_TURN_ON +SUPPORT_FLAGS = SirenEntityFeature.TURN_OFF | SirenEntityFeature.TURN_ON async def async_setup_platform( @@ -65,11 +58,11 @@ class DemoSiren(SirenEntity): self._attr_supported_features = SUPPORT_FLAGS self._attr_is_on = is_on if available_tones is not None: - self._attr_supported_features |= SUPPORT_TONES + self._attr_supported_features |= SirenEntityFeature.TONES if support_volume_set: - self._attr_supported_features |= SUPPORT_VOLUME_SET + self._attr_supported_features |= SirenEntityFeature.VOLUME_SET if support_duration: - self._attr_supported_features |= SUPPORT_DURATION + self._attr_supported_features |= SirenEntityFeature.DURATION self._attr_available_tones = available_tones async def async_turn_on(self, **kwargs: Any) -> None: