Unless I’ve missed something, doing conditions based on month isn’t possible. For instance I’m wanting to turn my Christmas lights on, and not turn on the outside lights during December.
Cheers,
Eric
Unless I’ve missed something, doing conditions based on month isn’t possible. For instance I’m wanting to turn my Christmas lights on, and not turn on the outside lights during December.
Cheers,
Eric
how about a value template sensor displaying the month (based on time_date sensor)
and then in the automation an condition which checks if that sensor is december?
https://github.com/CCOSTAN/Home-AssistantConfig/blob/master/script/monthly_front_house_scene.yaml
Check the rest of my Repo for the rest of the pieces.
**Shout out to @dale3h who knows Templates better than I knows english. **
How about using the Google Calendar sensor as a condition?
I use the following to create a sensor.current_month which I check the state of for automation purposes:
- platform: template
sensors:
current_month:
value_template: “{{ now().strftime(‘%B’) }}”
friendly_name: ‘Current Month’
Thanks guys, not quite what I was looking for, but they all offer options that I can make work.
Cheers
You can simply use {{now().month}}
to get the current month and use the same in your automation.