From 566624d0d853cdbdc57ede31d95339bdc40e3c44 Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Thu, 23 Feb 2017 04:36:34 +0000 Subject: [PATCH] Closs #69 - Back lights part of motion group. dim light at night. --- .../Timed_Triggers/sunrise_turn_off.yaml | 18 +++++++++++ .../sunset_turn_on.yaml} | 30 ++++++------------- configuration.yaml | 1 + group/weather.yaml | 1 + script/front_house_motion.yaml | 10 +++++++ 5 files changed, 39 insertions(+), 21 deletions(-) create mode 100755 automation/Timed_Triggers/sunrise_turn_off.yaml rename automation/{sunrise_turnon_and_off.yaml => Timed_Triggers/sunset_turn_on.yaml} (54%) diff --git a/automation/Timed_Triggers/sunrise_turn_off.yaml b/automation/Timed_Triggers/sunrise_turn_off.yaml new file mode 100755 index 00000000..6601dddc --- /dev/null +++ b/automation/Timed_Triggers/sunrise_turn_off.yaml @@ -0,0 +1,18 @@ + ################################### +## Sunrise and Sunset stuff +################################### + +- alias: 'Sunset Stuff off' + trigger: + - platform: sun + event: sunrise + offset: '-01:30:00' + + action: + - service: light.turn_off + entity_id: + - group.exterior_lights + - group.outdoor_front_lights + - group.outdoor_pool_lights + - group.all_lights + - service: script.interior_off diff --git a/automation/sunrise_turnon_and_off.yaml b/automation/Timed_Triggers/sunset_turn_on.yaml similarity index 54% rename from automation/sunrise_turnon_and_off.yaml rename to automation/Timed_Triggers/sunset_turn_on.yaml index 257d37a6..61088887 100755 --- a/automation/sunrise_turnon_and_off.yaml +++ b/automation/Timed_Triggers/sunset_turn_on.yaml @@ -18,9 +18,13 @@ - switch.foyer_outlet - service: light.turn_on entity_id: - - light.outdoor_bathroom - group.living_room_accents - #- delay: '00:{{ (range(1, 20)|random|int) }}:00' + - service: light.turn_on + data: + entity_id: + - light.outdoor_bathroom + brightness: 15 + - delay: '00:{{ (range(1, 20)|random|int) }}:00' - service: script.monthly_color_scene - service: script.Voice_notify data_template: @@ -28,25 +32,9 @@ {%- macro dark_outside() -%} {{ [ "It is pretty dark outside. I will turn on the outside lights now.", - "It's a little past Sunset. Time to turn on the outside lights. I'm on it.", - "I'll switch on the outside lights. It's getting dark outside.", - "Time to turn on the front lights. I'll take care of it." + "It is a little past Sunset. Time to turn on the outside lights. I'm on it.", + "I will switch on the outside lights. It is getting dark outside.", + "Time to turn on the front lights. I will take care of it." ] | random }} {%- endmacro -%} "{{ dark_outside() }}" -###################################################################### - -- alias: 'Sunset Stuff off' - trigger: - - platform: sun - event: sunrise - offset: '-01:00:00' - - action: - - service: light.turn_off - entity_id: - - group.exterior_lights - - group.outdoor_front_lights - - group.outdoor_pool_lights - - group.all_lights - - service: script.interior_off diff --git a/configuration.yaml b/configuration.yaml index 01ae9c77..2854bcec 100755 --- a/configuration.yaml +++ b/configuration.yaml @@ -54,6 +54,7 @@ ifttt: logbook: exclude: entities: + - automation.detect_lights_and_adjust_the_brightness_when_turned_on_based_on_time - sensor.since_last_boot - sensor.since_last_boot_templated - sensor.small_garage_status diff --git a/group/weather.yaml b/group/weather.yaml index 0d1e60a5..86232d30 100755 --- a/group/weather.yaml +++ b/group/weather.yaml @@ -8,6 +8,7 @@ Weather: - sensor.dark_sky_minutely_summary # - sensor.dark_sky_nearest_storm_distance - sensor.dark_sky_precip_intensity + - sensor.dark_sky_wind_speed - sensor.dark_sky_humidity - sensor.dark_sky_temperature - sensor.moon diff --git a/script/front_house_motion.yaml b/script/front_house_motion.yaml index be0c5210..0435744d 100755 --- a/script/front_house_motion.yaml +++ b/script/front_house_motion.yaml @@ -24,8 +24,18 @@ front_house_motion: value1: 'Motion has been detected by the front door.' - service: scene.turn_on entity_id: scene.front_full_brightness + - service: light.turn_on + data: + entity_id: + - light.outdoor_bathroom + brightness: 255 - delay: '00:{{ (range(5, 20)|random|int) }}:00' - service: light.turn_off entity_id: group.outdoor_front_lights + - service: light.turn_on + data: + entity_id: + - light.outdoor_bathroom + brightness: 15 - delay: '00:00:10' - service: script.monthly_color_scene