description: "Hall lights" mode: single trigger: - platform: time at: "07:30:00" id: morning_on - platform: state entity_id: - binary_sensor.hall_motion_sensors to: "on" from: "off" id: motion_on - platform: state entity_id: - binary_sensor.hall_motion_sensors from: "on" to: "off" id: motion_off for: hours: 0 minutes: 2 seconds: 0 condition: [] action: - choose: - conditions: - condition: trigger id: - morning_on sequence: - service: light.turn_on data: {} target: entity_id: light.hall_ceiling_lights - conditions: - condition: trigger id: - motion_on - condition: time after: "22:00:00" before: "07:30:00" sequence: - service: light.turn_on data: {} target: entity_id: light.hall_ceiling_lights - conditions: - condition: trigger id: - motion_off - condition: time after: "22:00:00" before: "07:30:00" sequence: - service: light.turn_off data: {} target: entity_id: light.hall_ceiling_lights