Hello,
I use several Zigbee devices in my house (lights, door/windows sensors…).
I would like to set up a kind of “automation” which would monitor the states of the devices and report every day/week some statistics, essentially how many state changes have occurred.
The objective is to being warned if some devices change state more or less often than they are supposed to do. For example, I have some door sensors that have to be reset from time to time, or a switch that sometimes change the state by its own.
If I could look at a periodic report, I could easily see if something is going wrong.
Option: potentially I could also set some thresholds, depending on some other things (presence in house…) to automatically warn if something is behaving in a strange way.
The question is: how could I achieve that ? The best solution wouldn’t need too many input, iterating on every device connected to home assistant, then through every states the device reports and computing the stats. I would not like to list every device and every state that I want to look at. Otherwise I could just create a view of history with every state I want to look at…I also came across history_stats integration, but a new “sensor” has to be created for each state to monitor…
Should / could I use the python integration to do that? I do not know how is it is to send all the devices states to the python integration…
Thanks in advance for any advice…