From b4d3de2eb966ab3e39d48d8d1a7e374c7606b32f Mon Sep 17 00:00:00 2001 From: Jan Bouwhuis Date: Mon, 31 Jan 2022 22:51:48 +0100 Subject: [PATCH] Mqtt binary sensor allow processing unavailable state (#21388) --- source/_integrations/binary_sensor.mqtt.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/_integrations/binary_sensor.mqtt.markdown b/source/_integrations/binary_sensor.mqtt.markdown index ef9b3d92de8..2ce84fdea51 100644 --- a/source/_integrations/binary_sensor.mqtt.markdown +++ b/source/_integrations/binary_sensor.mqtt.markdown @@ -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`.