Big AUTOMATION

I need help with an automation.
In my bathroom I have the folowing:

  • Regular Ceiling Lights
  • One Led Strip (SONOFF L2)
  • A smart Shelly relay and a Motion Sensor.

I already have the folowing automation for the ceiling lights
When there is movement, ceiling lights TURN ON, without Movement (after 1mn) ceiling lights TURN OFF
So far so good.

After some remodling I´ve added niche in my bathroom with the LED strip that I´ve mentioned.
Everything is already integrated in HA

I want the following:

When TIME = 20:00 LED StripTURNS ON
When TIME = 00:00 LED Strip TURNS OFF
CONDITION
IF MOTION is detected AND it’s 21:00 for example… Then LED Strip must remain ON and should not turn OFF when MOTION is not detected after 1mn

ALSO

IF it´s not between 20:00 and 00:00, let’s say 18:30… the LED Strip must also turn ON in conjuction with the ceiling lights… Then again when there is NO MOTION it should TURN OFF again AFTER 1mn

Some EDIT might be needed for spelling grammar.

Isn’t this implied in your trigger?

I personally would start with several separate automations - your existing one, a second one (based on a times of day helper) to control the LED strip scheduling, and a third to control the LED strip switching by motion sensor. The helper could be used as a condition in the motion sensor automation to stop it going off in the evening. There’s no particular benefit in lumping them all together.