From a4beb1d8afcb5157bfb9254e3c97de37807b55e1 Mon Sep 17 00:00:00 2001 From: Georgi Gardev Date: Sun, 27 Dec 2020 15:27:13 +0200 Subject: [PATCH] Adjust dashboard brightness automations --- .../devices/hallway/hallway_tablet.yaml | 2 -- .../packages/modules/control/dashboards.yaml | 10 +++++++ .../modules/lighting/areas/hallway.yaml | 20 ++++++++++--- .../modules/lighting/areas/kitchen.yaml | 30 +++++++------------ config/packages/routines/bedtime.yaml | 7 +---- config/packages/routines/good_night.yaml | 8 +---- config/packages/routines/leaving_home.yaml | 7 +---- 7 files changed, 39 insertions(+), 45 deletions(-) create mode 100644 config/packages/modules/control/dashboards.yaml diff --git a/config/packages/devices/hallway/hallway_tablet.yaml b/config/packages/devices/hallway/hallway_tablet.yaml index 9a40c77..b3fa07e 100644 --- a/config/packages/devices/hallway/hallway_tablet.yaml +++ b/config/packages/devices/hallway/hallway_tablet.yaml @@ -7,8 +7,6 @@ input_select: - "Leaving" - "Coming Home" - - automation: - alias: "Hallway tablet · Set to home after 10 minutes" trigger: diff --git a/config/packages/modules/control/dashboards.yaml b/config/packages/modules/control/dashboards.yaml new file mode 100644 index 0000000..739414b --- /dev/null +++ b/config/packages/modules/control/dashboards.yaml @@ -0,0 +1,10 @@ +script: + dashboards_light_down: + alias: "Dashboards · Light down" + sequence: + - service: light.turn_on + entity_id: + - light.browser_kitchen + - light.browser_hallway + data: + brightness_pct: 1 diff --git a/config/packages/modules/lighting/areas/hallway.yaml b/config/packages/modules/lighting/areas/hallway.yaml index 659b79d..9c12e28 100644 --- a/config/packages/modules/lighting/areas/hallway.yaml +++ b/config/packages/modules/lighting/areas/hallway.yaml @@ -17,8 +17,11 @@ automation: state: 'day' sequence: - service: light.turn_on - entity_id: light.hallway - + entity_id: + - light.hallway + - light.browser_hallway + data: + brightness_pct: 100 # Night Mode default: - service: light.turn_on @@ -41,6 +44,7 @@ automation: minutes: 5 action: - choose: + # Day Mode - conditions: condition: state entity_id: input_select.house_mode @@ -48,6 +52,11 @@ automation: sequence: - service: light.turn_off entity_id: light.hallway + - service: light.turn_on + entity_id: light.browser_hallway + data: + brightness_pct: 1 + # Night Mode default: - service: light.turn_on entity_id: @@ -57,6 +66,9 @@ automation: brightness_pct: 100 - service: light.turn_off entity_id: - - light.light_lohas_6 - light.light_le_8 - - light.browser_hallway + - light.light_lohas_6 + - service: light.turn_on + entity_id: light.browser_hallway + data: + brightness_pct: 1 diff --git a/config/packages/modules/lighting/areas/kitchen.yaml b/config/packages/modules/lighting/areas/kitchen.yaml index 3e0592c..bd15063 100644 --- a/config/packages/modules/lighting/areas/kitchen.yaml +++ b/config/packages/modules/lighting/areas/kitchen.yaml @@ -32,7 +32,6 @@ automation: entity_id: light.tuya_kitchen data: brightness_pct: 100 - # Night Mode default: - service: light.turn_on @@ -49,10 +48,6 @@ automation: to: "off" for: minutes: 30 - condition: - condition: state - entity_id: binary_sensor.georgi_home - state: "on" action: - choose: # Day Mode @@ -62,14 +57,11 @@ automation: state: 'day' sequence: - service: light.turn_off - entity_id: - - light.tuya_kitchen - - light.browser_kitchen - # - service: light.turn_on - # entity_id: light.browser_kitchen - # data: - # brightness_pct: 5 - + entity_id: light.tuya_kitchen + - service: light.turn_on + entity_id: light.browser_kitchen + data: + brightness_pct: 1 # Night Mode default: - service: light.turn_on @@ -77,10 +69,8 @@ automation: data: brightness_pct: 100 - service: light.turn_off - entity_id: - - light.light_le_12 - - light.browser_kitchen - # - service: light.turn_on - # entity_id: light.browser_kitchen - # data: - # brightness_pct: 5 + entity_id: light.light_le_12 + - service: light.turn_on + entity_id: light.browser_kitchen + data: + brightness_pct: 1 diff --git a/config/packages/routines/bedtime.yaml b/config/packages/routines/bedtime.yaml index 6b99a8a..c691c59 100644 --- a/config/packages/routines/bedtime.yaml +++ b/config/packages/routines/bedtime.yaml @@ -40,9 +40,4 @@ script: - media_player.living_room_tv - light.ceiling - switch.titanium - - light.browser_kitchen - - light.browser_hallway - # - service: light.turn_on - # entity_id: light.browser_kitchen - # data: - # brightness_pct: 1 + - service: script.dashboards_light_down diff --git a/config/packages/routines/good_night.yaml b/config/packages/routines/good_night.yaml index 82bc051..1908239 100644 --- a/config/packages/routines/good_night.yaml +++ b/config/packages/routines/good_night.yaml @@ -27,10 +27,4 @@ script: - media_player.living_room_tv - switch.titanium - group.all_radiators - - light.browser_kitchen - - light.browser_hallway - - # - service: light.turn_on - # entity_id: light.browser_kitchen - # data: - # brightness_pct: 1 + - service: script.dashboards_light_down diff --git a/config/packages/routines/leaving_home.yaml b/config/packages/routines/leaving_home.yaml index 8e819c1..19453aa 100644 --- a/config/packages/routines/leaving_home.yaml +++ b/config/packages/routines/leaving_home.yaml @@ -13,12 +13,7 @@ script: - climate.toshiba_ac - group.all_radiators - fan.philips_airpurifier - - light.browser_kitchen - - light.browser_hallway - service: media_player.media_stop entity_id: group.all_sonos - # - service: light.turn_on - # entity_id: light.browser_kitchen - # data: - # brightness_pct: 1 + - service: script.dashboards_light_down