mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 09:17:06 +00:00
MQTT scene config to integration key (#22832)
This commit is contained in:
parent
bad42341cf
commit
0f2777f579
@ -16,11 +16,30 @@ To enable a MQTT scene in your installation, add the following to your `configur
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml entry
|
# 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:
|
scene:
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
command_topic: zigbee2mqtt/living_room_group/set
|
command_topic: zigbee2mqtt/living_room_group/set
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% enddetails %}
|
||||||
|
|
||||||
{% configuration %}
|
{% configuration %}
|
||||||
availability:
|
availability:
|
||||||
description: A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with `availability_topic`.
|
description: A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with `availability_topic`.
|
||||||
@ -132,9 +151,9 @@ The example below shows a full configuration for a scene.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml entry
|
# Example configuration.yaml entry
|
||||||
|
mqtt:
|
||||||
scene:
|
scene:
|
||||||
- platform: mqtt
|
- unique_id: living_room_party_scene
|
||||||
unique_id: living_room_party_scene
|
|
||||||
name: "Living Room Party Scene"
|
name: "Living Room Party Scene"
|
||||||
command_topic: "home/living_room/party_scene/set"
|
command_topic: "home/living_room/party_scene/set"
|
||||||
availability:
|
availability:
|
||||||
@ -150,9 +169,9 @@ The example below shows a configuration using a JSON payload.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml entry
|
# Example configuration.yaml entry
|
||||||
|
mqtt:
|
||||||
scene:
|
scene:
|
||||||
- platform: mqtt
|
- name: Living Room Blue Scene
|
||||||
name: Living Room Blue Scene
|
|
||||||
unique_id: living_room_blue_scene
|
unique_id: living_room_blue_scene
|
||||||
command_topic: "home/living_room/set"
|
command_topic: "home/living_room/set"
|
||||||
payload_on: '{"activate_scene": "Blue Scene"}'
|
payload_on: '{"activate_scene": "Blue Scene"}'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user