Skip to content

Instantly share code, notes, and snippets.

@Snipercaine
Created November 5, 2018 02:21
Show Gist options
  • Save Snipercaine/9c916ed340bd5a92d5a3d1b1d381112c to your computer and use it in GitHub Desktop.
Save Snipercaine/9c916ed340bd5a92d5a3d1b1d381112c to your computer and use it in GitHub Desktop.
- alias: holiday_lights
initial_state: True
trigger:
platform: time
at: "20:40:00"
# platform: sun
# event: sunset
action:
service: input_select.select_option
entity_id: input_select.holiday
data_template:
option: >
{% if now().strftime("%m%d")|int == 0101 %}
Red White and Blue
{% elif now().strftime("%m%d")|int >= 0210 and now().strftime("%m%d")|int <= 0214 %}
Valentines Day
{% elif now().strftime("%m%d")|int == 0305 %}
Mardi Gras
{% elif now().strftime("%m%d")|int >= 0311 and now().strftime("%m%d")|int <= 0317 %}
St Paddys Day
{% elif now().strftime("%m%d")|int >= 0419 and now().strftime("%m%d")|int <= 0421 %}
Easter
{% elif now().strftime("%m%d")|int == 0504 %}
Star Wars Day
{% elif now().strftime("%m%d")|int == 0505 %}
Cinco de Mayo
{% elif now().strftime("%m%d")|int >= 1001 and now().strftime("%m%d")|int <= 1031 %}
Halloween
{% elif now().strftime("%m%d")|int >= 1101 and now().strftime("%m%d")|int <= 1130 %}
Thanksgiving
{% elif now().strftime("%m%d")|int >= 1201 and now().strftime("%m%d")|int <= 1230 %}
Christmas
{% elif now().strftime("%m%d")|int == 1231 %}
Red White and Blue"
{% else %}
Standard
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment