From 4efe0a784b983245d91d3b36d6dc9f89bb18a6f7 Mon Sep 17 00:00:00 2001 From: Faidon Liambotis Date: Fri, 18 Aug 2023 10:33:41 +0300 Subject: [PATCH] Add supported_features to the MQTT Alarm Control Panel (#28599) * Add supported_features to the MQTT Alarm Control Panel Add documentation for the new "supported_features" option. See home-assistant/core#98363. * Apply suggestions from code review Co-authored-by: Jan Bouwhuis * Add an example for MQTT Alarm Control Panel's supported_features * Use a block rather than a flow sequence in the supported_features example Co-authored-by: Jan Bouwhuis --------- Co-authored-by: Jan Bouwhuis --- .../alarm_control_panel.mqtt.markdown | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/source/_integrations/alarm_control_panel.mqtt.markdown b/source/_integrations/alarm_control_panel.mqtt.markdown index da585e18721..4392613411c 100644 --- a/source/_integrations/alarm_control_panel.mqtt.markdown +++ b/source/_integrations/alarm_control_panel.mqtt.markdown @@ -244,6 +244,11 @@ state_topic: description: The MQTT topic subscribed to receive state updates. required: true type: string +supported_features: + description: A list of features that the alarm control panel supports. The available list options are `arm_home`, `arm_away`, `arm_night`, `arm_vacation`, `arm_custom_bypass`, and `trigger`. + required: false + type: list + default: ["arm_home", "arm_away", "arm_night", "arm_vacation", "arm_custom_bypass", "trigger"] unique_id: description: An ID that uniquely identifies this alarm panel. If two alarm panels have the same unique ID, Home Assistant will raise an exception. required: false @@ -258,6 +263,26 @@ value_template: In this section you find some real-life examples of how to use this alarm control panel. +### Configuration with partial feature support + +The example below shows a full configuration with an alarm panel that only supports the `arm_home` and `arm_away` features. + +{% raw %} + +```yaml +# Example with partial feature support +mqtt: + - alarm_control_panel: + name: "Alarm Panel" + supported_features: + - arm_home + - arm_away + state_topic: "alarmdecoder/panel" + command_topic: "alarmdecoder/panel/set" +``` + +{% endraw %} + ### Configuration with local code validation The example below shows a full configuration with local code validation.