  - alias: 'Lys skab Claus'
    trigger:
      platform: state
      entity_id: binary_sensor.hue_motion_sensor_1_motion
      to: 'on'
    condition:
      - condition: numeric_state
        entity_id: sensor.hue_motion_sensor_1_illuminance
        below: 90
      - condition: time
        after: '06:00:00'
        before: '23:00:00'
    action:
      - service: homeassistant.turn_on
        target: 
          entity_id: light.skab_1
        data:
          brightness_pct: 100
          rgb_color:  [20, 255, 127]


  - alias: 'Sluk lys i skab Claus'
    trigger:
      platform: state
      entity_id: binary_sensor.hue_motion_sensor_1_motion
      to: 'off'
      for:
        minutes: 1
    action:
      service: homeassistant.turn_off
      data:
        entity_id:
          - light.skab_1

  - alias: 'Lys skab Anne'
    trigger:
      platform: state
      entity_id: binary_sensor.motion
      to: 'on'
    condition:
      - condition: numeric_state
        entity_id: sensor.hue_motion_sensor_1_illuminance_2
        below: 90
      - condition: time
        after: '06:00:00'
        before: '23:00:00'
    action:
      - service: homeassistant.turn_on
        target: 
          entity_id: light.skab_1
        data:
          brightness_pct: 100
          rgb_color:  [254, 11, 255]


  - alias: 'Sluk lys i skab'
    trigger:
      platform: state
      entity_id: binary_sensor.motion
      to: 'off'
      for:
        minutes: 1
    action:
      service: homeassistant.turn_off
      data:
        entity_id:
          - light.skab_1
