From 2693c1eb23f7f8a11d2b6f37899bea880c854fd7 Mon Sep 17 00:00:00 2001 From: Claus Dethlefsen Date: Thu, 9 Apr 2026 15:52:24 +0200 Subject: [PATCH] Add Syd light automation for MacBook activity --- include/automations/lys_syd.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 include/automations/lys_syd.yaml diff --git a/include/automations/lys_syd.yaml b/include/automations/lys_syd.yaml new file mode 100644 index 0000000..b605480 --- /dev/null +++ b/include/automations/lys_syd.yaml @@ -0,0 +1,32 @@ +- id: lys_syd_taend_ved_macbook_aktiv + alias: Tænd lys syd ved aktiv MacBook + mode: single + + trigger: + - platform: state + entity_id: binary_sensor.clauss_macbook_air_2_active + to: "on" + + condition: + - condition: numeric_state + entity_id: sensor.stue_motion_belysningsstyrke + below: 60 + + action: + - service: light.turn_on + target: + entity_id: light.syd + +- id: lys_syd_sluk_ved_macbook_inaktiv + alias: Sluk lys syd ved inaktiv MacBook + mode: single + + trigger: + - platform: state + entity_id: binary_sensor.clauss_macbook_air_2_active + to: "off" + + action: + - service: light.turn_off + target: + entity_id: light.syd \ No newline at end of file