diff --git a/homeassistant/components/overkiz/select.py b/homeassistant/components/overkiz/select.py index 74d3b3ba282..8482932e2e4 100644 --- a/homeassistant/components/overkiz/select.py +++ b/homeassistant/components/overkiz/select.py @@ -50,6 +50,17 @@ def _select_option_memorized_simple_volume( return execute_command(OverkizCommand.SET_MEMORIZED_SIMPLE_VOLUME, option) +def _select_option_active_zone( + option: str, execute_command: Callable[..., Awaitable[None]] +) -> Awaitable[None]: + """Change the selected option for Active Zone(s).""" + # Turn alarm off when empty zone is selected + if option == "": + return execute_command(OverkizCommand.ALARM_OFF) + + return execute_command(OverkizCommand.ALARM_ZONE_ON, option) + + SELECT_DESCRIPTIONS: list[OverkizSelectDescription] = [ OverkizSelectDescription( key=OverkizState.CORE_OPEN_CLOSED_PEDESTRIAN, @@ -83,6 +94,14 @@ SELECT_DESCRIPTIONS: list[OverkizSelectDescription] = [ ), entity_category=EntityCategory.CONFIG, ), + # StatefulAlarmController + OverkizSelectDescription( + key=OverkizState.CORE_ACTIVE_ZONES, + name="Active Zones", + icon="mdi:shield-lock", + options=["", "A", "B", "C", "A,B", "B,C", "A,C", "A,B,C"], + select_option=_select_option_active_zone, + ), ] SUPPORTED_STATES = {description.key: description for description in SELECT_DESCRIPTIONS}