1) Give a description of the problem
Virtual switch that I’m programming in my piston to be a master dimmer (for a group of philips bulbs) behaves erratically when other sources control the same dimmer bulbs.
2) What is the expected behavior?
Virtual dimmer can control group of dimming lightbulbs, but also notice when another mechanism (like the philips app) controls those lightbulbs and match their state, so I could use the virtual dimmer alongside other sources to control those bulbs seamlessly.
3) What is happening/not happening?
When I try to control the bulbs with the virtual dimmer, behavior is strange…most commonly, somehow the brightness shoots to nearly 100% after a couple weird swings of brightness. I believe this is due to the fact that my piston is looking for changes to both the virtual switch and the bulbs, so it creates a race condition/loop of sorts. I thought placing the switch in an if and the bulbs in an else or only looking for physical interaction with the switch (not programmatic) would fix the issue, but no luck. I suspect I’m missing some fundamentals of pistons…this is my first attempt. Should I use variables?
4) Post a Green Snapshot of the piston
5) Attach any logs (From ST IDE and by turning logging level to Full)
Couldn’t quite figure this one out, sorry
Thank you for any help. Apparently the dimmer issue is a long time one, I’m really hoping to come up with a robust solution.