diff --git a/homeassistant/components/satel_integra/config_flow.py b/homeassistant/components/satel_integra/config_flow.py index fe20a510560..e9e41306082 100644 --- a/homeassistant/components/satel_integra/config_flow.py +++ b/homeassistant/components/satel_integra/config_flow.py @@ -63,11 +63,21 @@ CODE_SCHEMA = vol.Schema( } ) +ARM_HOME_MODE_OPTIONS = ["1", "2", "3"] + PARTITION_SCHEMA = vol.Schema( { vol.Required(CONF_NAME): cv.string, - vol.Required(CONF_ARM_HOME_MODE, default=DEFAULT_CONF_ARM_HOME_MODE): vol.In( - [1, 2, 3] + vol.Required(CONF_ARM_HOME_MODE, default=DEFAULT_CONF_ARM_HOME_MODE): vol.All( + vol.Coerce(str), + selector.SelectSelector( + selector.SelectSelectorConfig( + options=ARM_HOME_MODE_OPTIONS, + mode=selector.SelectSelectorMode.DROPDOWN, + translation_key="arm_home_mode", + ) + ), + vol.Coerce(int), ), } ) diff --git a/homeassistant/components/satel_integra/const.py b/homeassistant/components/satel_integra/const.py index 929b8f27d09..8c7b7eed175 100644 --- a/homeassistant/components/satel_integra/const.py +++ b/homeassistant/components/satel_integra/const.py @@ -1,6 +1,6 @@ """Constants for the Satel Integra integration.""" -DEFAULT_CONF_ARM_HOME_MODE = 1 +DEFAULT_CONF_ARM_HOME_MODE = "1" DEFAULT_PORT = 7094 DOMAIN = "satel_integra" diff --git a/homeassistant/components/satel_integra/strings.json b/homeassistant/components/satel_integra/strings.json index 4d40282b536..a8593087488 100644 --- a/homeassistant/components/satel_integra/strings.json +++ b/homeassistant/components/satel_integra/strings.json @@ -113,7 +113,7 @@ "partition_number": "Partition number" }, "data_description": { - "arm_home_mode": "The mode in which the partition is armed when 'arm home' is used. For more information on what the differences are between them, please refer to Satel Integra manual.", + "arm_home_mode": "The arming mode to use for 'arm home':\nMode 1 fully arms and bypasses zones that have the 'Bypassed if no exit' option enabled.\nMode 2 disarms interior zones; exterior zones trigger silent alarms and other alarm zones trigger loud alarms.\nMode 3 is like mode 2, but delayed zones are instant.", "name": "The name to give to the alarm panel", "partition_number": "Enter partition number to configure" }, @@ -223,6 +223,13 @@ } }, "selector": { + "arm_home_mode": { + "options": { + "1": "1 - Full arming + bypasses", + "2": "2 - No interior zones", + "3": "3 - No interior zones or entry delay" + } + }, "binary_sensor_device_class": { "options": { "battery": "[%key:component::binary_sensor::entity_component::battery::name%]",