Open PeteCondliffe opened 5 years ago
After some more playing round the workaround I have come up with for motion is to ignored the off value and put a dealy_off in
- platform: mqtt
state_topic: "mywallpanel/wallpanel/sensor/motion"
name: wallpanel_motion
payload_on: '{"value":true}'
off_delay: 60
device_class: motion
With the wall panel set to reset motion every 30 seconds this works pretty stable
Not quite as good as the availability LWT offers but atleast the motion will now always revert back to off if n update is not provided for whatever reason
After some more playing round the workaround I have come up with for motion is to ignored the off value and put a dealy_off in
I went the same route plus enabled sensors' states published every 3 minutes and a MQTT binary sensor that reacts on state of motion OR sensors and holds its On
value for up to some pre-defined perod of time that is a bit greater than sensors' states publishing interval (210 seconds).
Think it's a bit better than using just motion sensor, try it.
But yes, the proper implementation of Birth/LWT is the way to go as it's standard, don't require a lot of HA code and works faster.
Birth & LWT for MQTT.
Describe the solution you'd like Birth & LWT for MQTT so the availability_topic can be used to ensure automatons can be triggered on a failed state or things turned back off.
Describe alternatives you've considered Open to suggestions