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