I’ve got a Shelly device that has an total power consumption sensor.
It measures the power consumption from the time it was plugged in untill now.
How can I keep track on how much it has been using every day? So I want to record the usage in days (monday, tuesday, wednesday,…) and weeks.
I can help you with part of this… You can use a History Stats sensor to get the total time per day (see below that I use for my thermostat). That will give you the value for the day. Unfortunately, I don’t know how to go about displaying a week’s worth of those values. Someone smarter than me will have to help out.
# History Stats for Furnace
- platform: history_stats
name: FurnaceOnToday
entity_id: sensor.downstairs_thermostat_hvac_state
state: 'heat'
type: time
start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
end: '{{ now() }}'
1 Like