- 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