Skip to content

Commit 17f54cf

Browse files
authored
Add header
1 parent 18d8814 commit 17f54cf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

source/_components/binary_sensor.mqtt.markdown

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ The `mqtt` binary sensor platform uses an MQTT message payload to set the binary
1717

1818
The binary sensor state will be updated only after a new message is published on `state_topic` matching `payload_on` or `payload_off`. If these messages are published with the `retain` flag set, the binary sensor will receive an instant state update after subscription and Home Assistant will display the correct state on startup. Otherwise, the initial state displayed in Home Assistant will be `unknown`.
1919

20+
## {% linkable_title Configuration %}
21+
2022
The `mqtt` binary sensor platform optionally supports an `availability_topic` to receive online and offline messages (birth and LWT messages) from the MQTT device. During normal operation, if the MQTT cover device goes offline (i.e., publishes `payload_not_available` to `availability_topic`), Home Assistant will display the binary sensor as `unavailable`. If these messages are published with the `retain` flag set, the binary sensor will receive an instant update after subscription and Home Assistant will display the correct availability state of the binary sensor when Home Assistant starts up. If the `retain` flag is not set, Home Assistant will display the binary sensor as `unavailable` when Home Assistant starts up. If no `availability_topic` is defined, Home Assistant will consider the MQTT device to be available.
2123

2224
To use an MQTT binary sensor in your installation, add the following to your `configuration.yaml` file:

0 commit comments

Comments
 (0)