mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-08-28 09:01:08 +00:00
Massive Migration! #292
This commit is contained in:
94
script/monthly_color_scene.yaml
Executable file
94
script/monthly_color_scene.yaml
Executable file
@@ -0,0 +1,94 @@
|
||||
######################################################################################################
|
||||
###Script to turn on scene for the appropriate month for the front of the house but only when the sun is down.
|
||||
# action:
|
||||
# - service: script.monthly_color_scene
|
||||
#
|
||||
# scenes should be named month_[01-12]_colors (month_06_colors)
|
||||
# Color help - http://www.esbnyc.com/explore/tower-lights/calendar
|
||||
######################################################################################################
|
||||
|
||||
monthly_color_scene:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: sun.sun
|
||||
state: 'below_horizon'
|
||||
|
||||
- service: scene.turn_on
|
||||
data_template:
|
||||
entity_id: >
|
||||
scene.month_
|
||||
{%- if states.sensor.flag.state == "True" -%}
|
||||
RWB
|
||||
{%- elif now().strftime("%m%d")|int == 101 -%}
|
||||
new_years_day
|
||||
{%- elif now().strftime("%m%d")|int >= 210
|
||||
and now().strftime("%m%d")|int <= 214-%}
|
||||
valentine
|
||||
{%- elif now().strftime("%m%d")|int == 228 -%}
|
||||
marti_gras
|
||||
{%- elif now().strftime("%m%d")|int == 314 -%}
|
||||
pi
|
||||
{%- elif now().strftime("%m%d")|int >= 315
|
||||
and now().strftime("%m%d")|int <= 317-%}
|
||||
st_patty
|
||||
{%- elif now().strftime("%m%d")|int >= 414
|
||||
and now().strftime("%m%d")|int <= 416-%}
|
||||
easter
|
||||
{%- elif now().strftime("%m%d")|int == 422 -%}
|
||||
st_patty
|
||||
{%- elif now().strftime("%m%d")|int == 504 -%}
|
||||
starwars
|
||||
{%- elif now().strftime("%m%d")|int == 505 -%}
|
||||
cinco_de_mayo
|
||||
{%- elif now().strftime("%m%d")|int == 514 -%}
|
||||
valentine
|
||||
{%- elif now().strftime("%m%d")|int == 618 -%}
|
||||
fathers_day
|
||||
{%- elif now().strftime("%m%d")|int >= 1001
|
||||
and now().strftime("%m%d")|int <= 1031-%}
|
||||
halloween
|
||||
{%- elif now().strftime("%m%d")|int >= 1123
|
||||
and now().strftime("%m%d")|int <= 1124-%}
|
||||
thanksgiving
|
||||
{%- elif now().strftime("%m%d")|int >= 1125
|
||||
and now().strftime("%m%d")|int <= 1211-%}
|
||||
christmas
|
||||
{%- elif now().strftime("%m%d")|int >= 1212
|
||||
and now().strftime("%m%d")|int <= 1220-%}
|
||||
hanukkah
|
||||
{%- elif now().strftime("%m%d")|int >= 1221
|
||||
and now().strftime("%m%d")|int <= 1230-%}
|
||||
christmas
|
||||
{%- elif now().strftime("%m%d")|int == 1231 -%}
|
||||
new_years_day
|
||||
{%- else -%}
|
||||
standard
|
||||
{%- endif -%}_colors
|
||||
|
||||
|
||||
# http://www.calendar-365.com/holidays/2017.html
|
||||
# 101 New_years_day (colorloop)
|
||||
# RWB 212 Lincoln's Birthday
|
||||
# 214 Valentine's Day (pink, red)
|
||||
# RWB 220 President's Day
|
||||
# 228 Mardi Gras (purple, green, gold )
|
||||
# 317 st Patty (green)
|
||||
# 414 Good Friday
|
||||
# 416 Easter
|
||||
# 422 Earth Day
|
||||
# 505 Cinco de Mayo (green, white, red)
|
||||
# 514 Mother's Day (pink, red) - Same as Valentine
|
||||
# RWB 520 Armed Forces Day
|
||||
# RWB 529 Memorial Day
|
||||
# RWB 614 Flag Day
|
||||
# 618 Fathers day (Orange, Blue)
|
||||
# RWB 704 July 4th
|
||||
# RWB 904 Labor Day
|
||||
# RWB 911 Patriots day
|
||||
# RWB 1009 columbus day
|
||||
# 1005 - 1031 halloween
|
||||
# RWB 1111 veterans day
|
||||
# 1123 Thanksgiving
|
||||
# 1212 Hanukkah start 8 days.
|
||||
# 1225 Chrismas
|
||||
# 1231 New years eve
|
Reference in New Issue
Block a user