All selected lights switch on correctly but 1 stays on when asked to switch off?

hi all can anyone help with this piston it runs fine and all selected items switch on but when requested to switch off after the 10 mins they all switch off apart from 1 light?

You could be seeing some Task cancellation going on with a 10 minute wait and a change in the initial trigger that started the whole piston. Meaning that after 10 minutes, “changes to present” is no longer true as presence has already “changed” to present. it would take looking at the logs to know for sure if that’s what is going on.

But the remedy would be to set Task cancellation to Never on the With statement. (Select the cog and go to the advanced settings).

At least that’s what I’d suggest.