Hi Group,
I’m trying to figure out for some days, but with no success. Anyhow I want to calculate and display on my dashboard some simple counters. Like - how long was a living room light on, how long were front door open, etc. But I somehow don’t manage. I tried using sensor in my config template as below, but the counter is not counting. I would appreciate if someone could point me to the solution!
Many thanks!
sensor:
- platform: history_stats
name: Living Room Main Light On Current Month
entity_id: light.yeelight_color4_0x13f24667
state: "On"
type: time
start: '{{ now().replace(month=1, day=1, hour=0, minute=0, second=0) }}'
end: "{{ now() }}"