Momentary Switch/button tile for Hue Scenes?


Using Hubitat, is there a way to create a stateless momentary switch or button tile for a Hue scene (more specifically a CoCoHue scene)?

I’m using the default switch tiles now…which turns on the Hue scene fine, but the tile displays that the lights are on whether they are or not ('cause Hue doesn’t keep Hubitat in sync).

I was able to mimic the functionality with an auto-off virtual switch and a rule machine app – but that’ll be a pretty clunky workaround.

Appreciate any suggestions.


Hi @Jamison, welcome to the community. Setting auto-off in the Virtual Switch to make it behave like a button is actually not uncommon. You may also be interested to checked out the Virtual Momentary Switch device handler developed by @Bloodtick_Jones.

Once you create this virtual momentary device, authorize it to SharpTools, and add it to the dashboard, you can edit the tile and change the layout to the Momentary Tile as described in the release note below and you can just tap it to trigger the associated rule and not having to track the switch’s state.


Is this what you are looking for?

That works… kludgey though. I have to create a virtual device and rules machine app for every scene I want to control this way. For consideration: the native Hubitat dashboard functionality – as painful as it is to use – has the ability to change a switch tile’s layout to a button.


Hi @Jamison - there’s probably a few other approaches that could be taken:

Momentary Tile

I’m not intimately familiar with the CoCoHue integration, but looking at the CoCoHue Scene Driver, it seems like it’s just missing the 'Momentary' capability. If you add that to the top of the driver where the rest of the capability definitions are and then reauthorize it to SharpTools, you should get the option to change the tile layout to Momentary.

Same Style for On/Off

Another approach we’ve seen community members use with virtual switches that don’t actually reflect state is to set the style for ‘on’ and ‘off’ the same (including making the footer color transparent to hide the on/off state). You would also want to disable the glow on the switch tile so the state stays exactly the same.

SharpTools Rules

Another approach you could use is to use SharpTools Rules to directly send whatever command you want. So rather than having to create virtual devices and react to those in Hubitat’s Rule Machine, you could just create a SharpTools Rule which sends whatever command you want directly to your desired CoCoHue device.

Then you can add the SharpTools Rule directly to your dashboard. Effectively just running whatever action is in the rule when the tile is clicked.

If you have multiple scenes that you’ll be doing this with, there’s even some tricks you can do to use a single SharpTools rule along with the special $.runRule() hyperlink syntax and IF Conditions to choose which device to send the command too. This approach is slightly more technical, but I’d be happy to provide some guidance if you’re interested as it ends up keeping things nice and tidy in a single rule and no additional devices.

1 Like

Thanks for the suggestions. I haven’t explored SharpTools Rules yet (was trying to keep all logic in one place in Hubitat), but will give them a look.

1 Like