MQTT scene config to integration key (#22832)

This commit is contained in:
Jan Bouwhuis 2022-05-23 14:35:17 +02:00 committed by GitHub
parent bad42341cf
commit 0f2777f579
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
```
<a id='new_format'></a>
{% 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"}'
```