Hey,
If you would do a seasonal switch, for like Christmas, halloween etc. How would you do it?
I have some automations that should be set to off and some lights that I want to be off aswell because my christmas tree is lighting my livingroom up.
Do you guys have some nice examples?
My first idea would be to create an input_select with the different “season” - one of them maybe “No season” and use this input as condition?!
input_select:
season:
name: Which season is it?
options:
- No season
- Christmas
- Halloween
- St. Patricks Day
- Easter
initial: No season
Maybe this helps or gives you an idea?
2 Likes
ammdc7
(ammdc7)
December 4, 2017, 3:13pm
3
I do this with a script that I call 30 minutes before sunset. Here’s the code, you could just add the different holidays that fit your schedule. After you set up the color scheme for each season, this is a set it and forget it solution.
I stole this code from someone’s shared yaml so all props to them! (I think it was @CCOSTAN )
month_color_scene:
sequence:
- condition: state
entity_id: input_boolean.holiday_lights
state: 'on'
- service: script.turn_on
data_template:
entity_id: >
script.month_
{%- if now().strftime("%m%d")|int >= 1001
and now().strftime("%m%d")|int <= 1031-%}
halloween_light_show
{%- elif now().strftime("%m%d")|int >= 1101
and now().strftime("%m%d")|int <= 1119-%}
thanksgiving_light_show
{%- elif now().strftime("%m%d")|int >= 1120
and now().strftime("%m%d")|int <= 1230-%}
christmas_light_show
{%- else -%}
month_standard_colors
{%- endif -%}_colors
1 Like
CCOSTAN
(Ccostan)
December 4, 2017, 3:15pm
4
Thanks. Here is the write up that leverages that code for my outside LED strips. Christmas lighting was just some code changes. No ladder necessary.
1 Like
ammdc7
(ammdc7)
December 4, 2017, 3:17pm
5
Seriously… Thank you!
Your yaml has provided many, MANY of us inspiration to do big projects with Home Assistant.
1 Like
Thank you guys!
I will try to make something with this great example.
I will return with my finish!
1 Like