Lights on then off

use this format...

With no 10 minute timeout. I don't think that is what the OP wants.

Why are you refreshing? That's unnecessary and just adds extra traffic onto your mesh.

because i have the osram bulbs and they dont update on off correctly

When turned off in general or through a dashboard. I think I've already responded to you on another thread about the dashboard issue with color bulbs.