With a lot of help from the forums, i finally got my history_stats
working to track the time the AC units are heating and/or cooling. the issue is that I have two of them (upstairs and downstairs). i’ve created history_stats for each of them as below:
- platform: history_stats
name: Thermostat Heating Today Upstairs
entity_id: sensor.hvac_activity_upstairs
state: 'heating'
type: time
start: '{{ now().replace(hour=0, minute=0, second=0) }}'
end: '{{ now() }}'
- platform: history_stats
name: Thermostat Cooling Today Upstairs
entity_id: sensor.hvac_activity_upstairs
state: 'cooling'
type: time
start: '{{ now().replace(hour=0, minute=0, second=0) }}'
end: '{{ now() }}'
- platform: history_stats
name: Thermostat Heating Today Downstairs
entity_id: sensor.hvac_activity_downstairs
state: 'heating'
type: time
start: '{{ now().replace(hour=0, minute=0, second=0) }}'
end: '{{ now() }}'
- platform: history_stats
name: Thermostat Cooling Today Downstairs
entity_id: sensor.hvac_activity_downstairs
state: 'cooling'
type: time
start: '{{ now().replace(hour=0, minute=0, second=0) }}'
end: '{{ now() }}'
But now i would like to have another history_stat this is a sum of both of the cooling and one for both the heating so i can track the total time across both units. i thought about adding creating another sensor that monitors both units, but that would not be correct when both units are on t the same time. Any way to sum these?