From d068bedf3608e2dcf1f7c08852335095defc1985 Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Fri, 20 Jan 2017 19:42:12 +0000 Subject: [PATCH] Moving stuff around. Changing sunrise and sunset type automations. --- automation/good_night.yaml | 3 --- automation/sunrise_turnon_and_off.yaml | 13 +++++++------ customize/switches.yaml | 4 ++-- group/switches.yaml | 15 ++++++++------- script/holiday_switches_on.yaml | 4 +++- script/switch_turn_off.yaml | 2 +- switch/rf_outlets.yaml | 2 +- 7 files changed, 22 insertions(+), 21 deletions(-) diff --git a/automation/good_night.yaml b/automation/good_night.yaml index dc23fc9d..313e1ec8 100755 --- a/automation/good_night.yaml +++ b/automation/good_night.yaml @@ -11,9 +11,6 @@ state: 'Offline' condition: - - condition: state - entity_id: group.family - state: home - condition: time after: '20:00:00' - condition: state diff --git a/automation/sunrise_turnon_and_off.yaml b/automation/sunrise_turnon_and_off.yaml index 0865ed1c..a8198e8e 100755 --- a/automation/sunrise_turnon_and_off.yaml +++ b/automation/sunrise_turnon_and_off.yaml @@ -8,10 +8,9 @@ event: sunset action: - - - service: script.monthly_front_house_scene - - service: script.holiday_switches_on - - delay: '00:{{ (range(1, 59)|random|int) }}:00' + - service: switch.turn_on + entity_id: + - switch.front_door_outlet - service: light.turn_on entity_id: - light.outdoor_bathroom @@ -19,14 +18,16 @@ - light.tv_stand_light data: transition: 1200 - + - service: script.holiday_switches_on + - delay: '00:{{ (range(1, 59)|random|int) }}:00' + - service: script.monthly_front_house_scene ###################################################################### - alias: 'Sunset Stuff off' trigger: - platform: sun event: sunrise - # offset: '-0{{ (range(1, 3)|random|int) }}:{{ (range(1, 59)|random|int) }}:00' + offset: '-01:00:00' action: - service: light.turn_off diff --git a/customize/switches.yaml b/customize/switches.yaml index 790d73be..e2ec6bf0 100755 --- a/customize/switches.yaml +++ b/customize/switches.yaml @@ -65,8 +65,8 @@ switch.Outlet_304_2: icon: mdi:power-plug assumed_state: true -switch.Outlet_304_3: - friendly_name: 'Outlet_304_3' +switch.Front_Door_Outlet: + friendly_name: 'Front Door Outlet' emulated_hue: true icon: mdi:power-plug assumed_state: true diff --git a/group/switches.yaml b/group/switches.yaml index 0586a990..328e766a 100755 --- a/group/switches.yaml +++ b/group/switches.yaml @@ -1,8 +1,9 @@ -Switches: - entities: - - switch.den_outlet - - switch.living_room_outlet - - switch.foyer_outlet - - switch.kitchen_Accents - - switch.printer_outlet +Switches: + entities: + - switch.den_outlet + - switch.living_room_outlet + - switch.foyer_outlet + - switch.kitchen_Accents + - switch.printer_outlet + - switch.front_door_outlet \ No newline at end of file diff --git a/script/holiday_switches_on.yaml b/script/holiday_switches_on.yaml index 612f5732..6a6b43cf 100755 --- a/script/holiday_switches_on.yaml +++ b/script/holiday_switches_on.yaml @@ -15,7 +15,9 @@ holiday_switches_on: - service: switch.turn_on entity_id: switch.foyer_outlet - delay: 00:00:30 - + - service: switch.turn_on + entity_id: switch.front_door_outlet + - condition: sun after: sunset - service: switch.turn_on diff --git a/script/switch_turn_off.yaml b/script/switch_turn_off.yaml index 60f8e30e..6bfb1ac4 100755 --- a/script/switch_turn_off.yaml +++ b/script/switch_turn_off.yaml @@ -31,7 +31,7 @@ switch_turn_off_all: - service: switch.turn_off entity_id: switch.living_room_amp - delay: '00:01:00' - - service: switch.turn_on + - service: switch.turn_off entity_id: switch.Outlet_304_4 - service: switch.turn_off diff --git a/switch/rf_outlets.yaml b/switch/rf_outlets.yaml index bb8c9103..a7c05f0b 100755 --- a/switch/rf_outlets.yaml +++ b/switch/rf_outlets.yaml @@ -88,7 +88,7 @@ signal_repetitions: 40 # Outlet 304_3 - Outlet_304_3: + Front_Door_Outlet: protocol: 1 pulselength: 186 code_on: 5330691