Your condition is redundant, and you don’t really need a trigger id. when you manually test it, it only runs the actions so you’ll always fail the trigger id condition in the if.
if it doesn’t trigger otherwise via the binary_sensor, then you want to verify that you have the correct entity_id.
Will try this, but entity ID’s are created with the GUI. Called livingroom (woonkamer) en diningroom (eetkamer). So i am not sure how this could be wrong.
When i look those devices up and turn them on/off manually it works.
I’m not sure what the entities have to do with this. It’s failing the condition when you hit the test button because there’s no trigger. That’s what your if condition is stopping. This is causing your test button to fail
I have tested your version of my automation. (Manually) the lights go on then.
Will have to test a bit longer to see if the binary sensors (motion) also turn the light on with your version.
Thanks so far will get back to you soon.
One question you removed the part if lights are on do nothing. Will this not tricker the light to flash / "turn on "again? If i am not mistaken i have seen that happing in the past.
Nope, that won’t trigger a flickering light. But you can try it yourself.
Turn on the light you want to check manually, after that go to Developer tools > Services and choose Light: turn on and change the code underneath to this:
If it’s just not running, then it’s not triggering. So something is wrong with the trigger itself or the entity. Are you 100% sure you have the correct entity? Are you 100% sure that it’s changing state when you walk in front of the motion sensors? You can watch all of this in developer tools → states page.