From 0f2777f579a1624295c3391c59db020679b127e8 Mon Sep 17 00:00:00 2001 From: Jan Bouwhuis Date: Mon, 23 May 2022 14:35:17 +0200 Subject: [PATCH] MQTT scene config to integration key (#22832) --- source/_integrations/scene.mqtt.markdown | 51 ++++++++++++++++-------- 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/source/_integrations/scene.mqtt.markdown b/source/_integrations/scene.mqtt.markdown index 52fb00a664f..feffc0f7ceb 100644 --- a/source/_integrations/scene.mqtt.markdown +++ b/source/_integrations/scene.mqtt.markdown @@ -16,11 +16,30 @@ To enable a MQTT scene in your installation, add the following to your `configur ```yaml # Example configuration.yaml entry +mqtt: + scene: + - command_topic: zigbee2mqtt/living_room_group/set +``` + + + +{% details "Previous configuration format" %} + +The configuration format of manual configured MQTT items has changed. +The old format that places configurations under the `scene` 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 scene: - platform: mqtt command_topic: zigbee2mqtt/living_room_group/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`. @@ -132,16 +151,16 @@ The example below shows a full configuration for a scene. ```yaml # Example configuration.yaml entry -scene: - - platform: mqtt - unique_id: living_room_party_scene - name: "Living Room Party Scene" - command_topic: "home/living_room/party_scene/set" - availability: - - topic: "home/living_room/party_scene/available" - payload_on: "ON" - qos: 0 - retain: true +mqtt: + scene: + - unique_id: living_room_party_scene + name: "Living Room Party Scene" + command_topic: "home/living_room/party_scene/set" + availability: + - topic: "home/living_room/party_scene/available" + payload_on: "ON" + qos: 0 + retain: true ``` ### Use with a JSON Payload @@ -150,10 +169,10 @@ The example below shows a configuration using a JSON payload. ```yaml # Example configuration.yaml entry -scene: - - platform: mqtt - name: Living Room Blue Scene - unique_id: living_room_blue_scene - command_topic: "home/living_room/set" - payload_on: '{"activate_scene": "Blue Scene"}' +mqtt: + scene: + - name: Living Room Blue Scene + unique_id: living_room_blue_scene + command_topic: "home/living_room/set" + payload_on: '{"activate_scene": "Blue Scene"}' ```