Hello everyone,
I now use the automation in various rooms, entrance area and stairwell. A really useful and good solution that has thought of pretty much everything. At this point, a big thank you for that!
Unfortunately, I noticed a few inconsistencies in the last few days (actually since the start of the setup for the affected rooms/zones). The light is sometimes (maybe 2-3 times a day/evening) not switched off properly according to the set timer.
I noticed the following behavior:
In the log of the entities, I can see how the light is switched on and off again by the automation. In the dashboard or when viewing the entity, it is also shown as switched off - but in fact it is still on. If I now operate the virtual switch, nothing physically changes in the light, but in HA it is then shown as switched on again and can then be switched off manually again. So far so good.
If the light is still switched on, even though the automation should have switched it off, and I enter the area again and thus trigger the motion detectors again, the automation says the light is switched on, but it remains āoffā in the entity view. Pretty confusing.
On top of that, I also set up ambience, with the option that the lights to be switched on affect my lighting intensity. In the case that the light stays on again, HA thinks it is off, the motion detectors are triggered and the automation does its thing, the motion detectors report a high luminosity and the automation should not switch the light on - but it does it anyway. I hope you have been able to follow me up to this point 
Could it perhaps be related to the fact that I have grouped the light (several sources) in the relevant areas as a group in the helpers and selected these groups as an entity in the respective automation? I come to this because in the other rooms, where I actually added the individual lamps as an entity, these problems have not occurred so far.
A quick word about my system:
I almost exclusively use Zigbee devices (for the devices in question, thatās 100%). Integrated into HA via Z2M. The Zigbee network seems very stable and reliable to me, at least when I think about the other daily operations of lights, sensors and heating, etc.
If I can give you any other important information, please let me know.
Best regards
Luppes