How do you build IR sensor automations?

I’ve recently added my first Sonoff IR motion sensor to a floor light switched by a Sonoff ZBMINI. I’ve created two automations, one for switching on after motion detect and after sunset, and one the same for switching it off again.

Unfortunately the sensor does not have a ambient light sensor, so this only works in combination with the “sun” entity. Not suitable for floors with poor daylight.

It was also a little hard to position the IR sensor, as it has a motion threashold of 1 minute and i had to cover several areas.

Did i do it the right way?

Get a light sensor if you want one.

Can you suggest one? Sonoff does not offer it.