Trigger entrance light when coming home

Hey people,

I used to have success with this piston but something has changed since I don’t know.
Scenario is when the presence sense gets active AND when the door contact changes from closed to open that will trigger
the lights to turn on. But it’s not working anymore. What am I missing?

Here is the configuration

Kind of silly to suggest, but have you tested the individual devices (most notably the contact sensor) to make sure they are working properly? My contact sensors (especially the official ST ones) get odd at times and stop reporting events and it takes a battery pull to get them working again.

Your code looks fine, so I’d look at the individual devices.