From de40346f83c5c6c7dd29907910530f4e23a7e9d5 Mon Sep 17 00:00:00 2001 From: Georgi Gardev Date: Sun, 21 Nov 2021 12:23:36 +0200 Subject: [PATCH] Fix presence automations --- .../home_dashboard/preferences_dashboard.yaml | 17 ++--------------- config/packages/routines/coming_home.yaml | 12 ++++++------ config/packages/routines/leaving_home.yaml | 17 ++++++++++++----- 3 files changed, 20 insertions(+), 26 deletions(-) diff --git a/config/lovelace/home_dashboard/preferences_dashboard.yaml b/config/lovelace/home_dashboard/preferences_dashboard.yaml index c73012a..8f67699 100644 --- a/config/lovelace/home_dashboard/preferences_dashboard.yaml +++ b/config/lovelace/home_dashboard/preferences_dashboard.yaml @@ -42,10 +42,10 @@ - background-image: url("/local/images/people/milena.jpg") - type: custom:button-card template: v3_badge - entity: input_boolean.georgi_home + entity: binary_sensor.someone_home - type: custom:button-card template: v3_badge - entity: input_boolean.player_2_home + entity: binary_sensor.someone_sleeping - type: horizontal-stack cards: @@ -149,19 +149,6 @@ - input_number.toshiba_trigger_temp - - type: custom:decluttering-card - template: v3_section_title - variables: - - title: Monitoring - - type: horizontal-stack - cards: - - type: custom:button-card - template: v3_button - entity: binary_sensor.someone_sleeping - - type: custom:button-card - template: v3_button - entity: binary_sensor.someone_home - - type: custom:decluttering-card template: v3_section_title variables: diff --git a/config/packages/routines/coming_home.yaml b/config/packages/routines/coming_home.yaml index f54a7db..445e9da 100644 --- a/config/packages/routines/coming_home.yaml +++ b/config/packages/routines/coming_home.yaml @@ -26,12 +26,6 @@ script: data: brightness_pct: 100 - # Cameras - - service: switch.turn_on - entity_id: switch.mercury_home_mode - - service: switch.turn_off - entity_id: switch.tapo_bedroom - - service: script.routine_coming_home_during_daytime - service: script.routine_coming_home_after_sunset @@ -43,6 +37,12 @@ script: - service: script.routine_coming_home_welcome_home - service: script.turn_on_all_radiators + # Cameras + - service: switch.turn_off + entity_id: switch.tapo_bedroom + - service: switch.turn_on + entity_id: switch.mercury_home_mode + routine_coming_home_during_daytime: alias: Routine · Coming home · During daytime sequence: diff --git a/config/packages/routines/leaving_home.yaml b/config/packages/routines/leaving_home.yaml index 44789eb..8c3f708 100644 --- a/config/packages/routines/leaving_home.yaml +++ b/config/packages/routines/leaving_home.yaml @@ -2,10 +2,6 @@ script: routine_leaving_home: alias: Routine · Leaving home sequence: - - service: switch.turn_off - entity_id: switch.mercury_home_mode - - service: switch.turn_on - entity_id: switch.tapo_bedroom - service: homeassistant.turn_off entity_id: @@ -18,7 +14,13 @@ script: - service: media_player.media_stop entity_id: group.all_sonos - - service: script.dashboards_light_down + + - service: light.turn_on + entity_id: + - light.browser_hallway + - light.browser_kitchen + data: + brightness_pct: 1 - service: input_select.select_option entity_id: input_select.hallway_dashboard_mode data: @@ -31,3 +33,8 @@ script: data: title: "🏠 *Presence Module · Leaving Home*" message: "I see you're leaving. Goodbye!" + + - service: switch.turn_on + entity_id: switch.tapo_bedroom + - service: switch.turn_off + entity_id: switch.mercury_home_mode