Virtual Shade Driver publish request to Hubitat's official

I posted this in a 2 year old thread so I doubt will be monitored so thought I would create a new one.

Is there anyway I could get the devs to publish the virtual shade driver code to GitHub?

Right now my sync rule (using the virtual shade device as the trigger for physical shades in the group) works perfectly to get around shades (without dimmer capability) to be grouped. It's set to watch for the "opening" or "closing" values on the virtual shade device, wait for the virtual shade to complete it's movement to new position (lowest I can set is 5 seconds), set the virtual shade position to a local variable, then set all my physical shades to that variable.

Simple and works for the open, close, and integer position commands from Alexa. It's just that the time from the Alexa command saying "ok" to the shades moving is 5 seconds (the minimum in the driver). 1 second (or better yet 0.5 seconds if supported) would be better. If I could get my hands on the virtual shade driver, I'm sure I could add the option for 1 second.

Setting the virtual shade device transition time to ASAP does not work as the virtual shade device never goes into the "opening" or "closing" states when ASAP is set.

I'll have a look


While Mike's looking at the built-in driver, I have one I used back when I was testing HubConnect every day... I added to Github today.

Throw it away when Mike supplies one :smiley:


The next update will have this fixed.


Thank you @mike.maxwell and @csteele.

@csteele, your driver worked perfectly. It dropped the action execution time to 1 second which is tolerable (but not Habitat local processing quick). Completely satisfied and now my blinds are grouped.

@mike.maxwell, looking forward to the native support ( doesn't seem to support 1 second) if for nothing more than cleanup.

Aw man, just noticed one snag. Looks like @csteele's driver is not HomeKit compatible. I'd rather the voice activation work than have it on my HK dashboard so I'm still happy but hopefully the updated included driver will work with HK as it does now.

Correct, Community Drivers and Apps are not permitted according to Apple's Certification Rules. Indeed, when the next Platform update is released the built-in driver will work just as it does now, but better :smiley:


semi related question, I saw Hubitat doesn’t support capability “WindowShadeLevel” like SmartThings does which is part of the reason why you can’t port things automatically.

Any ideas on if we could add that?

Had to write a dimmer driver below to work around it, but ui wise I can’t make the default Hubitat ui show a picture of a window :window: automatically since it pretends to be a dimmer. [RELEASE] Graber, Bali, Somfy Virtual Cord Shade Driver - V2.0 - Dimmer , Max/Min Limits & Battery

@mike.maxwell, any update on when this would make it into the native virtual shade driver? I still see only ASAP, 5s, 10s, 30s, 1m, and none as options.

what were you looking for?

This was the built-in virtual shade driver. Currently it has 5s/10s/30s/1m/ASAP/No selection as options for the transition time. I requested there be an option for 1s which I thought was confirmed for an upcoming release (maybe not?).

The end game is grouping shades. The Groups and Scenes app cannot group device type shades so the community (me included) ends up creating a virtual device (with the virtual shade driver) that "syncs" the individual shades to the virtual shade position. The app is trigger by the virtual shade driver changing. The minimum setting for this transition time is 5 seconds so the individual shades don't react to the group device change for 5 very long seconds.

Waiting 5 seconds for the shades to react runs contrary to the lightning fast local response Habitat excels at. So therefore I'm using a community driver from @csteele which has a 1 second option which makes the response time tolerable. Works great with the one exception that Apple HomeKit doesn't allow for devices with community drivers to be added by Habitat.

So a virtual shade group option in the app "Groups and Scenes" would be preferred, but sans that, the thought was modifying the built-in virtual shade driver to add a 1s option would be easy and a quick win. Either way, great product guys.

Why not use asap?

Because the only trigger that I can see we can monitor for shades is windowState. We can't monitor level or position. Changing to ASAP means windowShade might never change.

For example...if I change the level or position from 75% to 25%, the windowShade state stays at partially open. It never changes. The only thing that changes is the position and level variable. My sync app looks for a trigger of open/close/unknown of windowState.

If thats the csse then thats a bug that we will fix.

I'm not sure it would be a bug?
75% and 25% are both partially open so there is nothing to change windowState to. It does work if I change the level to 0% or 100% because we have a state change from open <> partially open <> closed.

There should be opening and closing states as well

There is, and if you set it to 5 seconds, those appear and the app triggers correctly. It's just that with ASAP, there is no time to open or close, the state just immediately goes from partially open to partially open which means the app is never triggered. If we could get ASAP to trigger a sub-second windowState change that would work.

1 Like

There's a similar issue with the new built-in Smartwings shade driver. It does not have a setLevel (dimmer) capability, so it can't be grouped with other shades in a lighting group (and shade groups aren't a thing for some reason). The community driver does provide the setLevel capability, so that's what I'm continuing to use.

The issue isnt similar at all really. Groups and mirror will be updated to support this in the future.


The nice thing about WindowShadeLevel is it seems that in Google Home etc.. It will show up asa window shade, looking at the groovy code from smartthings it seems that would solve most of the issues people have.

Then you can say all windows up or down. As of now with it acting as capability dimmer then if you tell lights to turn on then it will turn off/on when you say all lights on/off. (example code with WindowShadeLevel commented out)

Not sure there is an offical plan to match 1:1 Smarthings, but it will make porting drivers easier for sure.

Download the Hubitat app