From 9abd79831128a0315f66f72942483257c53a0143 Mon Sep 17 00:00:00 2001 From: Jan Bouwhuis Date: Mon, 23 May 2022 14:22:42 +0200 Subject: [PATCH] MQTT alarm_control_panel config to integration key (#22812) --- .../alarm_control_panel.mqtt.markdown | 66 ++++++++++++------- 1 file changed, 43 insertions(+), 23 deletions(-) diff --git a/source/_integrations/alarm_control_panel.mqtt.markdown b/source/_integrations/alarm_control_panel.mqtt.markdown index 5b5c540f6d3..3f93fcd88b9 100644 --- a/source/_integrations/alarm_control_panel.mqtt.markdown +++ b/source/_integrations/alarm_control_panel.mqtt.markdown @@ -31,12 +31,32 @@ To enable this platform, add the following lines to your `configuration.yaml`: ```yaml # Example configuration.yaml entry +mqtt: + alarm_control_panel: + - state_topic: "home/alarm" + command_topic: "home/alarm/set" +``` + + + +{% details "Previous configuration format" %} + +The configuration format of manual configured MQTT items has changed. +The old format that places configurations under the `alarm_control_panel` platform key +should no longer be used and is deprecated. + +The above example shows the new and modern way, +this is the previous/old example: + +```yaml alarm_control_panel: - platform: mqtt state_topic: "home/alarm" command_topic: "home/alarm/set" ``` +{% enddetails %} + {% configuration %} availability: description: A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with `availability_topic`. @@ -260,13 +280,13 @@ The example below shows a full configuration with local code validation. ```yaml # Example using text based code with local validation configuration.yaml -alarm_control_panel: - - platform: mqtt - name: "Alarm Panel With Numeric Keypad" - state_topic: "alarmdecoder/panel" - value_template: "{{value_json.state}}" - command_topic: "alarmdecoder/panel/set" - code: mys3cretc0de +mqtt: + alarm_control_panel: + - name: "Alarm Panel With Numeric Keypad" + state_topic: "alarmdecoder/panel" + value_template: "{{value_json.state}}" + command_topic: "alarmdecoder/panel/set" + code: mys3cretc0de ``` {% endraw %} @@ -279,26 +299,26 @@ The example below shows a full configuration with remote code validation and `co ```yaml # Example using text code with remote validation configuration.yaml -alarm_control_panel: - - platform: mqtt - name: "Alarm Panel With Text Code Dialog" - state_topic: "alarmdecoder/panel" - value_template: "{{ value_json.state }}" - command_topic: "alarmdecoder/panel/set" - code: REMOTE_CODE_TEXT - command_template: "{ action: '{{ action }}', code: '{{ code }}'}" +mqtt: + alarm_control_panel: + - name: "Alarm Panel With Text Code Dialog" + state_topic: "alarmdecoder/panel" + value_template: "{{ value_json.state }}" + command_topic: "alarmdecoder/panel/set" + code: REMOTE_CODE_TEXT + command_template: "{ action: '{{ action }}', code: '{{ code }}'}" ``` ```yaml # Example using numeric code with remote validation configuration.yaml -alarm_control_panel: - - platform: mqtt - name: "Alarm Panel With Numeric Keypad" - state_topic: "alarmdecoder/panel" - value_template: "{{ value_json.state }}" - command_topic: "alarmdecoder/panel/set" - code: REMOTE_CODE - command_template: "{ action: '{{ action }}', code: '{{ code }}'}" +mqtt: + alarm_control_panel: + - name: "Alarm Panel With Numeric Keypad" + state_topic: "alarmdecoder/panel" + value_template: "{{ value_json.state }}" + command_topic: "alarmdecoder/panel/set" + code: REMOTE_CODE + command_template: "{ action: '{{ action }}', code: '{{ code }}'}" ``` {% endraw %}