I would like to count heater running hours starting every 01 August. Currently I set up the following code for the sensor:
- platform: history_stats
name: Heater running hours
entity_id: sensor.input3_state
state: '1'
type: time
start: '{{ now().replace(year=(now().year-1)).replace(month=8).replace(day=1).replace(hour=0).replace(minute=0).replace(second=0) }}'
end: '{{ now() }}'
I understand that it counts now not only this season but also takes last year. I would like to find solution for excluding last year if the current date is in between August-December.
Need your help!