MQTT siren config to integration key (#22836)

This commit is contained in:
Jan Bouwhuis 2022-05-23 14:33:03 +02:00 committed by GitHub
parent 5a600d7ec0
commit 7879d2e3ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,11 +22,29 @@ To enable this siren in your installation, add the following to your `configurat
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
mqtt:
siren:
- command_topic: "home/bedroom/siren/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 `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: siren:
- platform: mqtt - platform: mqtt
command_topic: "home/bedroom/siren/set" command_topic: "home/bedroom/siren/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`.
@ -244,24 +262,24 @@ The example below shows a full configuration for a siren.
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
siren: mqtt:
- platform: mqtt siren:
unique_id: custom_siren - unique_id: custom_siren
name: "Intrusion siren" name: "Intrusion siren"
state_topic: "home/alarm/siren1" state_topic: "home/alarm/siren1"
command_topic: "home/alarm/siren1/set" command_topic: "home/alarm/siren1/set"
available_tones: available_tones:
- ping - ping
- siren - siren
availability: availability:
- topic: "home/alarm/siren1/available" - topic: "home/alarm/siren1/available"
payload_on: "ON" payload_on: "ON"
payload_off: "OFF" payload_off: "OFF"
state_on: "ON" state_on: "ON"
state_off: "OFF" state_off: "OFF"
optimistic: false optimistic: false
qos: 0 qos: 0
retain: true retain: true
``` ```
{% endraw %} {% endraw %}