From 29632bb3b233c5e866f59944aa422a33d9fd2702 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Sat, 13 Aug 2022 19:17:39 +0200 Subject: [PATCH] Fix brightness automation --- configuration/automations/brightness.yaml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/configuration/automations/brightness.yaml b/configuration/automations/brightness.yaml index cf07efa..77c4aa7 100644 --- a/configuration/automations/brightness.yaml +++ b/configuration/automations/brightness.yaml @@ -40,11 +40,21 @@ entity_id: device_tracker.amdn4684 state: 'home' action: - - service: cover.close_cover - target: - entity_id: - - cover.office_blinds - - cover.dining_blinds + - service: script.office_lights_on + +- id: brightness-ok-lights-off + alias: '[Brightness] Dark - turn on lights' + mode: single + trigger: + - platform: numeric_state + entity_id: sensor.office_illuminance + above: '60' + for: + hours: 0 + minutes: 1 + seconds: 0 + action: + - service: script.office_lights_off - id: brightness-ok alias: '[Brightness] OK'