The precision was a bit off. The miliseconds kept changing on each update-interval, even with no activity. See this update timeline in HA with update interval set to 10 seconds (this is just a 5 minute snippet of the timeline during the night):
New value on every update. The state value is the same, except for the miliseconds (since there was no activity during this period).
I changed the code to only change the reported value if it changed by more than 1 second. I believe this helps towards the intented use case for this sensor. Now, you should be able to make automations on value changed of this sensor.
The precision was a bit off. The miliseconds kept changing on each update-interval, even with no activity. See this update timeline in HA with update interval set to 10 seconds (this is just a 5 minute snippet of the timeline during the night): New value on every update. The state value is the same, except for the miliseconds (since there was no activity during this period).
I changed the code to only change the reported value if it changed by more than 1 second. I believe this helps towards the intented use case for this sensor. Now, you should be able to make automations on value changed of this sensor.