Override virtual shade commands

Maybe I am just blind but I am not able to find the option to override the open and close commands of my virtual shade.

Basically I have an electric awning outside that is controlled via an RF remote.
I have a universal braodlink remote controller that I programmed to have two stored commands to open and close the awning via hubitat and it works when I send the command directly from the broad link device.

I created a virtual shade so I can tell Alexa to open and close awnings instead of a switch so I don't have to say turn awning off.

I created a custom rule, w trigger awning opening to send the open command and trigger closing to send the close command.

This works for the most part however when the state is out of sync (for example someone used the physical remote to open the awning and hubitat thinks it is closed) telling Alexa to close awning results in a no op.

I can't help but see my setup is too convoluted. All I want is to override the actual open to send the command to braodlink and the close as well. I don't care about it being opened or closed, just if open command then do x.

I can't find how to do this via rule machine. Do I need to write a driver for this simple thing ?

I have the same issue with my Leviosa shades. I use a Bond hub to send the commands to the shades. I use a virtual shade as well.

If a remote is used then the virtual shade and actual shade don't match. So I get the same problem. I have not come up with a way either. What is needed is to be able to turn off device optimization on a virtual device. You can set this in group devices so it always sends the on or off command. Like you if I send the close command I want it to send the close command even if the device shows it is closed.

This got me thinking I wonder if the virtual shade switch attribute would allow you to set up a group device with one device in it and device optimization turned off.

Technically, if you can have the open command be overwritten to always open regardless of state it would be fixed

Since posting this it got me considering the the issue I have. So I looked at my rules again and in my case it was a pretty simple fix. I already had everything in place to do it. I even had added a line to send me a push notification when it happened. This never really comes up as we pretty much always use Alexa commands or RM rules to lower or raise our shades. It's just me and my wife and we don't touch the remotes unless the internet is down.

I have all my shades set for 3 set positions. All the way open, all the way closed and one midpoint position. Like you I use a virtual shade. Once a virtual shade changes position it triggers the rule that then sends the command to the bond hub to control the actual shade. I have all the shades closing at a specific time each evening. The only time I really ever have the problem is when for whatever reason one of the shades will not close. This happens very seldomly, so I usually just grab the remote and close it because if I tell Alexa to close it, it can't because the virtual shade is already closed.

Solution:

First make your Alexa routine so that if you tell Alexa to open or close it sets the shade to position of 3 let's say to close 97 to open. That way anytime you activate your Alexa routine it triggers your rule because the virtual shade does change. The HE rule to open or close your awning should be triggered by the virtual shade changing which then sends the open or close command to your awning. Next pause this rule and create a another rule to set your virtual shade to 0 or 100, fully open or closed, then resume the first rule. You have to pause the original rule because changing the shade will reactivate the shade again. Also have a variable in your main rule that stores the current state of the shade for the next activation of your Alexa routine.

Now if you tell Alexa to close the shade and you look at the variable you created and if it is showing a 0 position you know to just go ahead and send the command to close the shade. It is out of sync.

I hope that makes sense.

[Edit] After writing all that it should be much simpler for you. You only send open or close. I have multiple positions to consider.

In your case since you just want to open or close. Just have the Alexa routine set to 3 or 97. That triggers the rule if the shade is at 3 send the close command if at 97 send open command and then set the virtual shade to 0 if closed or 100 if open.

That will trigger the rule again, but if you are looking for a 3 or 97 position then the 0 and 100 won't do anything.

OR...

It occurred to me you probably don't want to create a routine you just want to use the virtual switch name. Another option if you don't want the virtual shade to show the actual position. I also control my shades with the dashboard so I want the virtual shade to show the position of the actual shade.

The rule below should work, you can just say open or close and it will always send open or close. The virtual shade will always be shown as partially open though.

Thank you, why do you set the positing to 50 at the end, doesn't that always mean that your shades will be set to 50?

I mentioned that at the end of the text above the rule. The virtual shade will always be show as partially open. You have to change the state of the virtual shade or the rule does not trigger. That rule is a very simple way to do it. If you want a dashboard to show the state of the awning then you should read through the explanation I gave above that.

If you set the shade to 50 then whenever you tell Alexa to open or close the shade there will always be a change in the virtual shade, so it will always send the command to the actual; shade.

I have a broadlink controller as well and I'm trying to figure out how to set the shade levels within the device functions so it knows that it takes 32 seconds to open and close and setting a mid point for 16 sec s. Any help here?