I could use some help with the below.
This template writes my monthly energy consumption in sensor.energie_maand every last day of the month (23:59).
template:
- trigger:
- platform: template
value_template: "{{ (now() + timedelta(days=1)).day == 1 and now().strftime("%H:%M") == '23:59' }}"
sensor:
- name: "Maandelijks Energie"
state: "{{ states('sensor.energie_maand') }}"
unit_of_measurement: "kWh"
device_class: energy
Now I don’t need this anymore.
That’s why I would like to “rebuild” the template for logging in a specific month.
I would like to log energy consumption in sensor.energie_maand every last day of September (23:59)
(I use it only for one month in a year)
Who can help me with this and change the template for a specific mont (September) in a year?
Thanks,
Henk