Setting States on a virtual device

I am new to Smartthings. I am transitioning from HomeSeer. In HomeSeer I have two virtual devices; one for Day/Night and the other for Guests (Yes/No). I created two virtual devices using TAustin’s Edge Creator.
The states are on/off. I can’t figure out how to change them to Day/Night and Yes/No.

In HomeSeer this is easy to do. I knew I would run into some conversion issues but I didn’t think this would be one of them.

Any help would be Appreciated.

1 Like

The virtual switches themselves only offer state values of on/off.

Normally in smartthings, you could have that switch going on be the trigger in a smartthings routine created in the smartthings app, and use it to change the “location mode“ to home or away. I’m not sure if that’s what you were trying to do or not, but it’s how it’s done in smartthings. There is a global variable for location mode. (there’s also one for security mode, by the way)

The following topic discusses more about that:

FAQ: Armed/Disarmed states vs Away/Home modes confusion

As it happens, it appears that this process has broken for local virtual devices yesterday. That bug is being discussed in the following thread. Note that things appear to still be working for virtual switches which run in the cloud. It’s only the local ones which are broken. But of course, that includes all of the ones from custom edge Drivers, like Vedge creator.

Local Virtual Switches and Location Modes Failing (15 Nov 2023)

So… we are not given the option to add more Available states for a Virtual switch. It’s just on or off.

There is a global variable called location mode which has the possible values of home or away, and you can change that based on the state of your virtual switch just by using a routine created in the smartthings app.

At least you could up until yesterday, when it appears to have broke. :disappointed_relieved:

For your guest virtual device, you’ll just have to accept the state values of on or off. We don’t have a way to change what the values are called.

If you set up the guest as a virtual presence device rather than an on/off switch, you’ll have access to on/off as well as present/away.


If you use the following driver along with your virtual switches you can make the device tile say what ever you want using routines.


This looks like it would do what I need. I’ll try it out. Thanks!

1 Like

When I name my virtual switches, I add the state to the name to remind me what they do. For instance, I have a Day/Night vSwitch and I named it “Day/Night 0/1” that way I know that if it’s ON its Night, I put the binary state in the same order as the thing I’m toggling to make it easier for me to remember. Just my little trick to keep track of what they do and how they are toggled.

1 Like

It will take multiple routines to get what you want. The following is a sample