So Hubitat Virtual Buttons are not supported? I’m a bit confused about this since there’s a specific area in the Sharptools app in Hubitat to include Buttons and you can add Buttons to Dashboards. It just doesn’t look like you can do anything with Buttons.
I wanted to see if I could add one tile that has On and Off but doesn’t show the current state. Basically it either turns on a group of lights or turns off a group of lights.
Seems like my only option is to create two momentary virtual switches, one to turn the lights on and one to turn the lights off.
Depending on what the goal is, a Virtual Switch could be a good choice here. Since you want to separately be able to turn things On and Off, even a regular Virtual Switch might make sense - then you could have the group of lights ‘follow’ that virtual switch. (Or use Hubitat’s native ‘Group’ app)
If you specifically want separate tiles for On and Off, then two Virtual Switches configured as momentary devices makes sense:
Another approach would be to create a SharpTools.io Rule and run that directly from your dashboard.
And here’s a bit of additional detail on button like devices in Hubitat if you’re interested…
Background Details... (tap to open)
Buttons in Hubitat are a bit of a quirky thing.
Buttons are supposed to be more like sensors in that they should not define any commands (reference)… they are only supposed to report which button was physically pressed. So from a tile perspective, it didn’t make a lot of sense to create a tile specific to Hubitat’s Button implementation when it would only show the ID of the last button that was pressed. And for a single button device, that would always just show “1” which isn’t particularly helpful.
On the other hand, the Momentary capability exposes a single command called push()… but ironically there is no built-in Virtual Momentary device!
The most common approach is to use a Virtual Switch with the preference set to Auto Turn Off so it acts like momentary switch.
I use a bunch of “stateless” virtual dimmers and buttons in Hubitat which I use with Alexa and Google Home. This allows the use to say Alexa, Turn on the Patio Lights or Alexa, set the Patio Lights to 25%. If the virtual switch is already On or already set at 25%, because the virtual switch is “stateless”, Alexa will still send the command to Hubitat and my rule that’s triggered by the virtual switch will fire. The reason I’m doing all this is sometimes a light or two in a group gets turned off or on and I the ability the ability to easily turn them all On/Off or sync their dim levels. All this works great.
I wanted to add these stateless virtual switches to my Dashboards but they don’t work the same way they do when using voice control. For example, if the tile for the virtual switch is already On, there’s no way to issue another On. This is what led me to create a virtual button with two buttons, one for On and one for Off, thinking I could add that to my dashboard and somehow get it labeled correctly. I now know that isn’t an option.
So I went back a created two momentary virtual switches, one to turn the lights on and the other to turn the lights off. Those work but I’m having a problem getting them labeled correctly since they both report a state of On and briefly Off before going back to On.
I would like to see support added for Hubitat’s buttons. They are implemented entirely different from SmartThings, and can’t seem to be added to SharpTools. I would prefer that if a tile be assigned to a specific button and if pressed, a prompt would ask for a press, a long press or hold (depending on the particular button configuration.
Hey @Dan_Fox I’ve merged your post in with a similar topic from a few days ago.
Can you help me better understand the use case for a Hubitat Virtual Button driver? For example, why not use a Virtual Momentary Switch or run a Rule directly?
Also see the Additional Details section of my previous post. Technically speaking, Hubitat button capabilities only report events. The push, hold, release methods aren’t defined in any of Hubitat’s official capabilities even though the built in Virtual Button driver has these methods.
I have a couple of old Iris 4-button devices. Each supports a press and a long press. I can attach a different function to each. So if I could duplicate this in my Sharp Tools dashboard, maybe using a modal pop-up to ask which button I press, I’d be happy.
Yes, I can use virtual momentary switches to do the same thing (which I do) but that takes up more valuable screen space. And requires more programming.