Routines and Window Shades

How about Valves. What shows up if you select there?

Just trying to figure out who gets to see what: I do not have Shades or Valves so is it by capability that it doesn’t show (Routines knowing that you have a device that falls in that category for it to even display section)? Or something else. Because I can see on the additional settings for Shades to perform Routine if…

Are you US or UK?

Yes, my dome water valve shows in the valve section

US or UK? I can’t remember because I’m ancient :stuck_out_tongue_winking_eye:

Yes :slight_smile: I live across the street from you

Those will only show up if you have devices with those capabilities defined.

When you saved the Somfy in the Routine and then edit again, is the device gone from the Routine when displaying it?

It still shows

Yet it still displays the Window Shades on my additional settings to perform when… (Albiet it says I can’t add this). No consistency in it :slight_smile:

@jbtibor open a ticket with Support. That’s all we got for you :slight_smile:

I already did but support usually redirects to the community forum :frowning:

The selection is hidden by design for devices someone doesn’t have, see hideWhenEmpty attribute:
http://docs.smartthings.com/en/latest/smartapp-developers-guide/preferences-and-settings.html#hide-when-empty

Just as I suspected, UK support just avoids responsibility, I get answers like
“But, of course, it does fall outside of our scope. You would need to rely on the community for help with your blinds integration and to get it working in Routines or other automations.”
“I know this is frustrating and I am sorry for that but we are unable to provide you with support, in regards to unofficial devices, that require custom coding and/or Device Handlers, in order to integrate them.”

The most technical reply I got was:
"the Routine shows this as “shadeAction enum 0 or 100"”
However, this was of no help.

I highlighted few times that my request is about the official routines in the official Android app and the official help pages but I always get pushed back with this is custom stuff we don’t care about like comments.
I wonder what would they do if Somfy or other shade manufacturer approaches them.

Anyway I figured it out myself, so here it is in case others need it.

The routine calls the setLevel(percent) command which is listed for other devices on capabilities page but not for shades. This is called with 0 for close and the selected percent value for open. Parameter value is a string, not number.

With the information from this post, I solved it by adding this to the handler:

def setLevel(String value) {
if (device.currentValue(“position”) > value.toInteger()) {
sendEvent(name: “windowShade”, value: “closing”);
sendEvent(name: “garageDoorControl”, value: “closing”);
} else if (device.currentValue(“position”) < value.toInteger()) {
sendEvent(name: “windowShade”, value: “opening”);
sendEvent(name: “garageDoorControl”, value: “opening”);
}
setFibaro((value.toInteger() > 0) ? value.toInteger()-1 : 0, null)
}