Example SmartApp Groovy code for working with a Window Shade

I have been a software developer for many years but I am a total newbie when it comes to working with Groovy. Can someone please point me to a smartapp example that works with a window shade. I am going to be modifying a Smartapp that was written by another developer to add support within the code for a window shade and a code example of working with one would be very helpful.

Thanks in advance for the help

Check the quick browse lists in the community – created wiki. There are lists for window coverings in both the smartapps section and the device type handler section. :sunglasses:

http://thingsthataresmart.wiki/index.php?title=How_to_Quick_Browse_the_Community-Created_SmartApps_Forum_Section#Quick_Browse_Links_for_SmartApps

Thanks!! I knew this had to exist but I just wasn’t sure where to look and my search for “shade” didn’t seem to turn up anything but posts. Thanks again.

1 Like

What shades are you asking about.

The majority of shades are really just dimmers behind the scenes.

I would look at the Device Handler for the shade and see what the underlying commands are.

Most likely they are:
On
Off
setLevel

1 Like

Thanks Ben. I wasn’t aware of that and it helps a great deal. I need to check with the manufacturer as it is a shade product that is still under development though the plan is to make it work with SmartThings. I’m going to be beta testing it shortly and was trying to update some code I have to support it. However, if they, as you suggested, implement the shade to look like a dimmer then I don’t need to do any additional work.

Thanks again.

Here is the Somfy shades device handler which I use for my blinds. Before it was just showing up as a dimmer switch. Hopefully they will map it to a similar way.

Thanks again!!