I have some sensors from xiaomi, which are not very reliable.
The Pi looses the connection to my Xiaomi bluetooth temperature sensors every now and than. Only a Pi reboot does a reconnect. Other temperature sensors need a manual activity to reconnect.
My idea is to do an automatic reboot, when one of the bluetooth sensors got no new value i.e. for more than 1 hour.
Second I would like to display something, when one of my sensor has paused to long. I.e. a traffic light. Green 0 to 30 minutes, yellow from 30 to 60 and red above…
Might someone have an idea how to realize that?
(I’ve never made an automation…)
Ok, so first we should convert the lastchanged sensor to seconds since last update, and then make a shell_command to reboot the pi. Since the homeassistant user running inside docker don’t have sudo rights, we need to trigger an external script. I’ll post this later today.
@tjntomas: Tomas, might you link your solution? Haven’t found that…
Unfortunately, the bluetooth connection still drops after some time and the sensors won’t update anymore.