I have a curtain motor - one that i can just turn on/off with no knowledge of what the state of the curtain is.
Years ago, before virtual devices, I created my own X10 device for the purpose (using an unused X10 address). Wrapped around it were various triggers, schedules and action groups that would attempt to remember the state so if the curtain was open (the device was 'on') and I switched or scheduled the device on, the motor wouldn't run. It worked pretty well.
I've just retired my last X10 device (the motor relay is now Z-wave) and though I'd try unwrapping all the complex triggering and use a Virtual Device with actions associated with on and off and a variable to hold the state. Great. But I was hoping it would handle the situation of a virtual device that was on being switched on again by not executing the on action group. No such luck.
Am I missing something or will I still have to have triggers? My proposed workaround is for the on/off action groups to simply change the state of the variable associated with state and then have triggers that operate when that variable CHANGES. Not super messy but would like it to be simpler if possible.
TIA
Nick