From f5dbe7e8f28097c7f78aee0813d83a1e4896efcc Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Fri, 6 Jan 2017 01:37:28 +0000 Subject: [PATCH] Testing configuration at /home/hass/.homeassistant --- automation/holiday.yaml | 52 +++++++++++++------------- automation/sunrise_turnon_and_off.yaml | 7 ++-- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/automation/holiday.yaml b/automation/holiday.yaml index 2bdac5e9..79cbdda4 100755 --- a/automation/holiday.yaml +++ b/automation/holiday.yaml @@ -1,27 +1,27 @@ -################################### -## Holiday Lights on/off with IFTTT/Alexa support -################################### - -- alias: 'Holiday Stuff on' - trigger: - - platform: sun - event: sunset - - platform: event - event_type: holiday_lights_on - - action: - - service: script.holiday_switches_on - - -- alias: 'Holiday Stuff off' - trigger: - - platform: sun - event: sunrise - offset: '-03:30:00' - - platform: event - event_type: holiday_lights_off - - action: - - service: script.switch_turn_off_all - +################################### +## Holiday Lights on/off with IFTTT/Alexa support +################################### + +- alias: 'Holiday Stuff on' + trigger: + - platform: sun + event: sunset + - platform: event + event_type: holiday_lights_on + + action: + - service: script.holiday_switches_on + + +- alias: 'Holiday Stuff off' + trigger: + - platform: sun + event: sunrise + offset: '-0{{ (range(1, 3)|random|int) }}:{{ (range(1, 59)|random|int) }}:00' + - platform: event + event_type: holiday_lights_off + + action: + - service: script.switch_turn_off_all + \ No newline at end of file diff --git a/automation/sunrise_turnon_and_off.yaml b/automation/sunrise_turnon_and_off.yaml index a5fbe184..a1a3a346 100755 --- a/automation/sunrise_turnon_and_off.yaml +++ b/automation/sunrise_turnon_and_off.yaml @@ -6,9 +6,10 @@ trigger: - platform: sun event: sunset - + offset: '00:{{ (range(1, 59)|random|int) }}:00' + action: - - delay: '00:{{ (range(1, 59)|random|int) }}:00' + - service: script.monthly_front_house_scene - service: script.holiday_switches_on - delay: '00:{{ (range(1, 59)|random|int) }}:00' @@ -26,7 +27,7 @@ trigger: - platform: sun event: sunrise - offset: '-{{ (range(1, 3)|random|int) }}:{{ (range(1, 59)|random|int) }}:00' + offset: '-0{{ (range(1, 3)|random|int) }}:{{ (range(1, 59)|random|int) }}:00' action: - service: light.turn_off