Monthly Scene code uses 2 digits for 1 through 9 months.

This commit is contained in:
CCOSTAN
2017-01-21 05:51:18 +00:00
parent 9b5ffa1009
commit 3c8e5e9d66
3 changed files with 9 additions and 4 deletions

View File

@@ -2,10 +2,10 @@
# http://www.w3schools.com/colors/colors_hex.asp # http://www.w3schools.com/colors/colors_hex.asp
# service: scene.turn_on # service: scene.turn_on
# entity_id: scene.month_front_1_colors # entity_id: scene.month_front_01_colors
- name: month_front_1_colors - name: month_front_01_colors
entities: entities:
light.outdoor_sconce_2: light.outdoor_sconce_2:
state: 'on' state: 'on'

View File

@@ -1,5 +1,5 @@
###################################################################################################### ######################################################################################################
###[SkyBell HD](http://amzn.to/2dcexIB) Script to turn on Front light FULL bright for 15m when motion is detected and then return to the normal colors. ###[SkyBell HD](http://amzn.to/2dcexIB) Script to turn on Front light FULL bright for 5 to 20m when motion is detected and then return to the normal colors.
# action: # action:
# - service: script.front_house_motion # - service: script.front_house_motion
# #

View File

@@ -3,7 +3,7 @@
# action: # action:
# - service: script.monthly_front_house_scene # - service: script.monthly_front_house_scene
# #
# scenes should be named month_front_[1-12]_colors (month_front_6_colors) # scenes should be named month_front_[01-12]_colors (month_front_06_colors)
###################################################################################################### ######################################################################################################
monthly_front_house_scene: monthly_front_house_scene:
@@ -12,6 +12,11 @@ monthly_front_house_scene:
entity_id: sun.sun entity_id: sun.sun
state: 'below.horizon' state: 'below.horizon'
- service: logbook.log
data_template:
name: "Launching Scene:"
message: "scene.month_front_{{ states('sensor.date').split('-')[1] }}_colors"
- service: scene.turn_on - service: scene.turn_on
data_template: data_template:
entity_id: "scene.month_front_{{ states('sensor.date').split('-')[1] }}_colors" entity_id: "scene.month_front_{{ states('sensor.date').split('-')[1] }}_colors"