From 7879d2e3addd826f41546362210a2a491078f2fa Mon Sep 17 00:00:00 2001 From: Jan Bouwhuis Date: Mon, 23 May 2022 14:33:03 +0200 Subject: [PATCH] MQTT siren config to integration key (#22836) --- source/_integrations/siren.mqtt.markdown | 54 ++++++++++++++++-------- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/source/_integrations/siren.mqtt.markdown b/source/_integrations/siren.mqtt.markdown index 855e90c8fde..d97c5b3f0cd 100644 --- a/source/_integrations/siren.mqtt.markdown +++ b/source/_integrations/siren.mqtt.markdown @@ -22,11 +22,29 @@ To enable this siren in your installation, add the following to your `configurat ```yaml # Example configuration.yaml entry +mqtt: + siren: + - command_topic: "home/bedroom/siren/set" +``` + + +{% details "Previous configuration format" %} + +The configuration format of manual configured MQTT items has changed. +The old format that places configurations under the `siren` 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 siren: - platform: mqtt command_topic: "home/bedroom/siren/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`. @@ -244,24 +262,24 @@ The example below shows a full configuration for a siren. ```yaml # Example configuration.yaml entry -siren: - - platform: mqtt - unique_id: custom_siren - name: "Intrusion siren" - state_topic: "home/alarm/siren1" - command_topic: "home/alarm/siren1/set" - available_tones: - - ping - - siren - availability: - - topic: "home/alarm/siren1/available" - payload_on: "ON" - payload_off: "OFF" - state_on: "ON" - state_off: "OFF" - optimistic: false - qos: 0 - retain: true +mqtt: + siren: + - unique_id: custom_siren + name: "Intrusion siren" + state_topic: "home/alarm/siren1" + command_topic: "home/alarm/siren1/set" + available_tones: + - ping + - siren + availability: + - topic: "home/alarm/siren1/available" + payload_on: "ON" + payload_off: "OFF" + state_on: "ON" + state_off: "OFF" + optimistic: false + qos: 0 + retain: true ``` {% endraw %}