What hub platform version are you running? Check Settings > Hub Details.
To troubleshoot, you will also need to:
Enable all logging for the rule (triggers, actions, and events)
Ideally, enable descriptionText logging for the virtual device you are turning on/off in your actions
Provide a screenshot of your actual rule.
Provide a screenshot of the output of Logs, filtered to just #1 or possibly #1 and #2 above, that illustrate the problem
Possibly provide the "Events" history from the device detail page of the same virtual device as above, though descriptionText logging hints are usually good enough to see (though technically not the authoritative source of events)
Links to these would also be helpful, as I do not remember seeing any cases where the problem wasn't one with the device itself, not RM.
Well this is weird. I can't recreate it with a new virtual button and new virtual switch now.
But it still fails with my existing virtual switch, and a virtual button.
Could there be an automation the virtual "Deck Lights" switch is used by causing the headache?
[EDIT] Another thought. "Deck Lights" was originally a zwave switch. I created the virtual switch and did a "swap apps device" to move the automations to the new virtual switch.
This hub is on the latest non-beta: 2.4.0.148
Here's the live logs of pressing virtual button 1, twice.
I guess our cases were a little different. Mine was from a physical switch that I replaced with a virtual switch. When I get a free minute, I'm going to create a new virtual switch and test it as I move automations/apps over to it. I'm thinking maybe it's an automation causing it, or perhaps because I used swap apps device and something is lingering in the backend.
I've replaced a real device with a virtual device driver before (using the device UI) and the virtual device operated as expected, in any event there isn't an issue with the button controller app.
If you can enumerate the specific steps taken to reproduce this, let me know and I'll have a look...
Well I just fixed it. I created a new virtual switch called Deck Lights, and told it to replace my old virtual switch. I then deleted "Deck Lights (old)", and now the button controller rule turns it on and off as it should.
Not a state per se, but could there have been something lingering in the database from the old physical switch I originally replaced?