If the device never publishes an “off” message, then the MQTT Binary Sensor should employ the off_delay
option. In that specific situation, the use of retained message isn’t recommended. It’s something I explained in a different post related to receiving multiplexed payloads:
I didn’t see jlw52761 reply to your question if the device publishes an “off” message of any kind. What I did see written is that the payload may at times fail to contain the eventtype
key. It’s unclear if that implicitly indicates an “off” message or if it’s just one of the quirks of the device’s behavior. The template I suggested assumes the key’s absence implies an “off” message. If the key exists in the payload but its value is anything other than event_start
the template will also interpret it as an “off” message.
Anyway, we’re discussing a lot of hypothetical operational edge-cases but we don’t know all the details of the device jlw52761 is using.