diff --git a/automation/detect_and_adjust_lights.yaml b/automation/detect_and_adjust_lights.yaml index 4e3b9cf0..48d6bf7a 100755 --- a/automation/detect_and_adjust_lights.yaml +++ b/automation/detect_and_adjust_lights.yaml @@ -2,7 +2,7 @@ ### Detect when lights are turned on and adjust them accordingly based on time. ### Code by @JesseWebDotCom ############################################################################## -- alias: detect_light_between 5am and 8am +- alias: detect lights and adjust the brightness when turned on based on time. trigger: - platform: event event_type: state_changed @@ -10,7 +10,10 @@ condition: - condition: state entity_id: group.family - state: home + state: 'home' + - condition: state + entity_id: input_boolean.alert_mode + state: 'off' - condition: template value_template: "{{ trigger.event.data is not none }}" - condition: template @@ -41,6 +44,6 @@ {%- elif hour >= 20 or hour <24 -%} 40 {%- else -%} - 20 + 15 {%- endif %} \ No newline at end of file diff --git a/customize/input_booleans.yaml b/customize/input_booleans.yaml index 004421af..90c1393f 100755 --- a/customize/input_booleans.yaml +++ b/customize/input_booleans.yaml @@ -26,9 +26,9 @@ input_boolean.pill_reminder: emulated_hue: False hidden: False -input_boolean.trash_reminder: - friendly_name: 'Trash Day Reminder' - icon: mdi:delete +alert_mode: + friendly_name: Alert Mode + icon: mdi:alert-octagram emulated_hue: False hidden: False \ No newline at end of file diff --git a/input_boolean/home_modes.yaml b/input_boolean/home_modes.yaml index 5d33b31b..a05ffb61 100755 --- a/input_boolean/home_modes.yaml +++ b/input_boolean/home_modes.yaml @@ -8,9 +8,9 @@ school_mode: icon: mdi:school initial: on -trash_reminder: - name: Trash Day Reminder - icon: mdi:delete +alert_mode: + name: Alert Mode + icon: mdi:alert-octagram initial: off pill_reminder: diff --git a/script/front_house_motion.yaml b/script/front_house_motion.yaml index dd079a4e..a5876d25 100755 --- a/script/front_house_motion.yaml +++ b/script/front_house_motion.yaml @@ -15,8 +15,15 @@ front_house_motion: - condition: state entity_id: sun.sun state: 'below_horizon' + + - service: input_boolean.turn_on + data: + entity_id: input_boolean.alert_mode - service: scene.turn_on entity_id: scene.front_full_brightness + - service: input_boolean.turn_off + data: + entity_id: input_boolean.alert_mode - delay: '00:{{ (range(5, 20)|random|int) }}:00' - service: light.turn_off entity_id: group.outdoor_front_lights diff --git a/script/monthly_front_house_scene.yaml b/script/monthly_front_house_scene.yaml index 29ff84c7..d35d2ac1 100755 --- a/script/monthly_front_house_scene.yaml +++ b/script/monthly_front_house_scene.yaml @@ -11,6 +11,9 @@ monthly_front_house_scene: - condition: state entity_id: sun.sun state: 'below_horizon' + - condition: state + entity_id: input_boolean.alert_mode + state: 'off' - service: logbook.log data_template: