alias: 'Turn on living room at sunset'
trigger:
  platform: sun
  event: sunset
  offset: "-00:45:00"
condition:
  condition: and
  conditions:
    - condition: state
      entity_id: group.presence
      state: 'home'
    - condition: or
      conditions:
      - condition: state
        entity_id: light.endtable
        state: 'off'
      - condition: state
        entity_id: light.corner_table
        state: 'off'
action:
  service: scene.turn_on
  entity_id: scene.lr_relax
