Multiple automations for yeelight

Hello, I am trying to create a yeelight automation based on motion sensor and times. My algorithm is as follows,
Turn on Light when motion is detected (for 2 minutes which is anyway default)
Turn Off light when sensor stopped detecting motion
Turn on scene when sensor stopped detecting motion and time is before 2230

I have got three automations for this which are as follows, my question is that can i merge them in 1 or 2 automations rather having three different automations. My automation is based on algorithm provided above.

Any help will be highly appreciated.


- id: '1604525180178'
  alias: Turn on Lights - lamp (Motion On)
  description: ''
  trigger:
  - type: motion
    platform: device
    device_id: 0065155a0ecd11eb9cdaed2f0d71a8be
    entity_id: binary_sensor.motion_sensor_158d0004462447
    domain: binary_sensor
  condition: []
  action:
  - scene: scene.lampp_scene_test
  mode: restart

- id: '1605867004041'
  alias: Turn on Lights - lamp (Motion Off) (Light Off -1)
  description: ''
  trigger:
  - type: no_motion
    platform: device
    device_id: 0065155a0ecd11eb9cdaed2f0d71a8be
    entity_id: binary_sensor.motion_sensor_158d0004462447
    domain: binary_sensor
    for:
      hours: 0
      minutes: 0
      seconds: 0
  condition: []
  action:
  - type: turn_off
    device_id: 5a78bd501ebf11eb98f84b0129316fc2
    entity_id: light.lamp_light
    domain: light
  mode: parallel
  max: 10

- id: '1604525518314'
  alias: Turn on Lights - lamp (Motion Off) (Flow Start 2)
  description: ''
  trigger:
  - type: no_motion
    platform: device
    device_id: 0065155a0ecd11eb9cdaed2f0d71a8be
    entity_id: binary_sensor.motion_sensor_158d0004462447
    domain: binary_sensor
    for:
      hours: 0
      minutes: 0
      seconds: 0
  condition:
  - condition: time
    before: '10:00'
  action:
  - scene: scene.lamp_light_flow
  mode: parallel
  max: 10