diff --git a/config/lovelace/advanced_dashboard/08_automations.yaml b/config/lovelace/advanced_dashboard/08_automations.yaml index 5fa0b0a..c2eed31 100644 --- a/config/lovelace/advanced_dashboard/08_automations.yaml +++ b/config/lovelace/advanced_dashboard/08_automations.yaml @@ -111,6 +111,7 @@ cards: - automation.house_mode_set_to_bed - automation.house_mode_set_to_night - automation.house_mode_toggle_on_bedside_switch_hold + - automation.house_mode_set_to_day_if_bedroom_door_was_opened - type: entities title: Guest mode diff --git a/config/packages/modes/house_mode.yaml b/config/packages/modes/house_mode.yaml index 48d144b..e664a4c 100644 --- a/config/packages/modes/house_mode.yaml +++ b/config/packages/modes/house_mode.yaml @@ -49,3 +49,27 @@ automation: to: "night" action: - service: script.routine_good_night + + - alias: House mode ยท Set to day if bedroom door was opened + trigger: + - platform: state + entity_id: binary_sensor.bedroom_door + to: "on" + - platform: state + entity_id: group.bedroom_windows + condition: + - condition: template + value_template: "{{ states('input_datetime.alarm_time')[0:2] | int >= now().hour }}" + - condition: not + conditions: + - condition: state + entity_id: input_select.house_mode + state: "day" + - condition: state + entity_id: input_boolean.georgi_home + state: "on" + action: + - service: input_select.select_option + entity_id: input_select.house_mode + data: + option: "day" diff --git a/config/packages/modules/lighting/by_rooms/kitchen.yaml b/config/packages/modules/lighting/by_rooms/kitchen.yaml index 2775f84..1ffa052 100644 --- a/config/packages/modules/lighting/by_rooms/kitchen.yaml +++ b/config/packages/modules/lighting/by_rooms/kitchen.yaml @@ -60,7 +60,7 @@ automation: conditions: - condition: state entity_id: input_select.house_mode - state: 'day' + state: "day" - condition: state entity_id: input_boolean.georgi_home state: "on"