I don’t believe the refresh command will work in webcore. Maybe you can change the piston and add another trigger such as motion or another light in the area that is also on.
FYI - for anyone having a similar issue, I think this may be resolved.
You can install Pollster; this seems to help. I only needed it for 2 switches, so it isn’t killing the network.
With Pollster, I just set it to poll every 1 minute for the selected devices. This updates ST with the right status of those switches. This in turn allows the automation to work since it has pretty recent status updates…
There is still a 60 second gap though.
You can also use the ‘refresh’ command in webCoRE. I ended up testing this out by sending a refresh, waiting 10 seconds, and then if the switch is still on, do x.
I’m not 100% sure you need Pollster since the refresh command seems to do the same thing.