Hey,
I want to realize an operation hours counter. The counter itself seems to be working by the “on”-state.
sensor:
- platform: history_stats
name: operational hours light 01
entity_id: light.down_01
unique_id: cfa3c4e1-a3a5-41ac-xxxx-da4xxxxe1ded
state: "on"
type: time
start: "{{ 0 }}"
end: "{{ now() }}"
But:
The value is decreasing sometimes. How to prevent this? I think this relates to recorder. Is there any option to keep the values or another simple way to create counter for lots of devices?