- alias: 'Turn Living Room Ceiling Light on when there is Movement'
  trigger:
    platform: state
    entity_id: binary_sensor.living_room_motion
    from: 'off'
    to: 'on'
  condition:
    condition: state
    entity_id: input_boolean.bed_mode
    state: 'on'
  action:
    service: light.turn_on
    entity_id: light.living_room_ceiling_light

- alias: 'Turn Living Room Ceiling Light off after last Movement'
  trigger:
    platform: state
    entity_id: binary_sensor.living_room_motion
    from: 'on'
    to: 'off'
    for:
      minutes: 3
      seconds: 30
  condition:
    condition: state
    entity_id: input_boolean.bed_mode
    state: 'on'
  action:
    service: light.turn_off
    entity_id: light.living_room_ceiling_light

Add automations for living room lights during bed mode
Add automations for living room lights during bed mode
