Closes #113 - Added Justin's Color Torando trigger!

This commit is contained in:
CCOSTAN
2017-03-31 01:17:47 +00:00
parent b3fa51e9cc
commit d57338dc2e
3 changed files with 35 additions and 15 deletions

19
automation/color_tornado.yaml Executable file
View File

@@ -0,0 +1,19 @@
######################################################################
## Color Tornado!
######################################################################
- alias: 'Color Tornado'
trigger:
- platform: state
entity_id: input_boolean.color_tornado
state: 'on'
from: 'off'
action:
- service: light.turn_on
entity_id:
- light.justin_go
data:
effect: colorloop
- service: input_boolean.turn_off
entity_id: input_boolean.color_tornado

View File

@@ -23,6 +23,10 @@ flash:
name: Flash name: Flash
initial: off initial: off
color_tornado:
name: Color Tornado!
initial: off
guard_dog: guard_dog:
name: Guard Dog name: Guard Dog
initial: off initial: off

View File

@@ -1,5 +1,5 @@
###################################################################################################### ######################################################################################################
###Script to turn on scene for the appropriate month for the front of the house but only when the sun is down. ###Script to turn on scene for the appropriate month for the front of the house but only when the sun is down.
# action: # action:
# - service: script.monthly_color_scene # - service: script.monthly_color_scene
# #
@@ -11,10 +11,7 @@ monthly_color_scene:
- condition: state - condition: state
entity_id: sun.sun entity_id: sun.sun
state: 'below_horizon' state: 'below_horizon'
- condition: state
entity_id: input_boolean.alert_mode
state: 'off'
- service: logbook.log - service: logbook.log
data_template: data_template:
name: "Launching Scene:" name: "Launching Scene:"
@@ -33,18 +30,18 @@ monthly_color_scene:
or now().strftime("%m%d")|int == 1111 or now().strftime("%m%d")|int == 1111
-%} -%}
RWB RWB
{%- elif now().strftime("%m%d")|int >= 210 {%- elif now().strftime("%m%d")|int >= 210
and now().strftime("%m%d")|int <= 214-%} and now().strftime("%m%d")|int <= 214-%}
valentine valentine
{%- elif now().strftime("%m%d")|int == 228 -%} {%- elif now().strftime("%m%d")|int == 228 -%}
marti_gras marti_gras
{%- elif now().strftime("%m%d")|int >= 314 {%- elif now().strftime("%m%d")|int >= 314
and now().strftime("%m%d")|int <= 317-%} and now().strftime("%m%d")|int <= 317-%}
st_patty st_patty
{%- else -%} {%- else -%}
standard standard
{%- endif -%}_colors" {%- endif -%}_colors"
- service: scene.turn_on - service: scene.turn_on
data_template: data_template:
entity_id: > entity_id: >
@@ -62,23 +59,23 @@ monthly_color_scene:
or now().strftime("%m%d")|int == 1111 or now().strftime("%m%d")|int == 1111
-%} -%}
RWB RWB
{%- elif now().strftime("%m%d")|int >= 210 {%- elif now().strftime("%m%d")|int >= 210
and now().strftime("%m%d")|int <= 214-%} and now().strftime("%m%d")|int <= 214-%}
valentine valentine
{%- elif now().strftime("%m%d")|int == 228 -%} {%- elif now().strftime("%m%d")|int == 228 -%}
marti_gras marti_gras
{%- elif now().strftime("%m%d")|int >= 314 {%- elif now().strftime("%m%d")|int >= 314
and now().strftime("%m%d")|int <= 317-%} and now().strftime("%m%d")|int <= 317-%}
st_patty st_patty
{%- else -%} {%- else -%}
standard standard
{%- endif -%}_colors {%- endif -%}_colors
# http://www.calendar-365.com/holidays/2017.html # http://www.calendar-365.com/holidays/2017.html
# 101 New_years_day (colorloop) # 101 New_years_day (colorloop)
# RWB 212 Lincoln's Birthday # RWB 212 Lincoln's Birthday
# 214 Valentine's Day (pink, red) # 214 Valentine's Day (pink, red)
# RWB 220 President's Day # RWB 220 President's Day
# 228 Mardi Gras (purple, green, gold ) # 228 Mardi Gras (purple, green, gold )
# 317 st Patty (green) # 317 st Patty (green)
@@ -100,4 +97,4 @@ monthly_color_scene:
# 1123 Thanksgiving # 1123 Thanksgiving
# 1212 Hanukkah start 8 days. # 1212 Hanukkah start 8 days.
# 1225 Chrismas # 1225 Chrismas
# 1231 New years eve # 1231 New years eve