mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-24 01:37:23 +00:00
Mqtt binary sensor allow processing unavailable state (#21388)
This commit is contained in:
parent
69abae8b9f
commit
b4d3de2eb9
@ -8,9 +8,9 @@ ha_iot_class: Configurable
|
||||
ha_domain: mqtt
|
||||
---
|
||||
|
||||
The `mqtt` binary sensor platform uses an MQTT message received to set the binary sensor's state to `on` or `off`.
|
||||
The `mqtt` binary sensor platform uses an MQTT message received to set the binary sensor's state to `on`, `off` or `unknown`.
|
||||
|
||||
The 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 state will be updated only after a new message is published on `state_topic` matching `payload_on`, `payload_off` or `None`. 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`.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user