I created helper template sensor using the following statement {{ state_attr("climate.nest_thermostat_e", "hvac_action") }}
So when I add this helper sensor into dashboard it shows me the current state - heating/cooling/idle as well as how long the state was continuing before state change occured - see duration
So my question is - how do I display of the summary of heating/cooling in hours/minutes per 24h, previous day, last week, last month and since the begining of the year in the dashboard?
It should be a just entities type card like:
HVAC Action today:
Heating - x hours y minutes
Cooling - x hours y minutes
HVAC Action yesterday:
Heating - x hours y minutes
Cooling - x hours y minutes
HVAC Action last week:
Heating - x hours y minutes
Cooling - x hours y minutes
HVAC Action last month:
Heating - x hours y minutes
Cooling - x hours y minutes
HVAC Action since Jan 1:
Heating - x hours y minutes
Cooling - x hours y minutes
I’m also using a Nest (only for heat though), but I have a daily cumulative chart.
(Take this with a grain of salt because I’m a coding half-wit (and I got help getting this one to work correctly back in the day), but this is what I use to track when my boiler is “on” in a 24 hour period. It’s been working flawlessly for years now.)
Should be as simple as changing your entity name, and then duplicating the sensor for the ‘cooling’ parameter.
I put it on my dashboard using a graph card in lovelace showing 1 week, so I can compare daily usage.
# History Stats for Furnace
- platform: history_stats
name: FurnaceOnToday
entity_id: sensor.thermostat
state: 'heating'
type: time
start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
end: '{{ now() }}'