Need help with Capabilites

Hello there. I want to connect a Thermostat. Now, I use the capability “Thermostat”. For more informations about the capability: http://docs.smartthings.com/en/latest/capabilities-reference.html#thermostat. Now I want to change the value of an attribute. In the example below I want to change the attribute coolingSetpoint. But the Problem is that I always get null back on the attribute. Can someone help me or tell me where my mistake is?

Thanks

Unbenannt

heatingSetpoint is an Attribute, not a variable.

To access an Attribute in a DTH you need to use a the currentState method like:

device.currentState("heatingSetpoint")
1 Like

Thanks you very much. And how can I change a Attribute?

device.currentState(“heatingSetpoint”) = variable doesnt work…

sendEvent(...) … See the Docs for details.

(NB: In a DTH, if you have a parse() method, its return value is automatically passed to sendEvent()).

The prob is that I have a cloud device and they dont need the parse method. Im gonna look after this send Event method…

Thank you

It worked! But now I got another Problem. When I change the Attribute, it doesnt get changed in the tile. How can I do that?

It’s best you look at some great examples first…

Tiles are documented, but examples are even better.

2 Likes

Man I’m trying. But I’m tired of everything here. Searching already for 2 Weeks for a solution how to do my integration with devicehandler and service manager but its just terrible man. Cant find anything and no solution til yet

“2 Weeks”??? I’ve been here for over 5 years.

SmartThings is an incredibly powerful and complex platform. You can’t expect to become proficient in something in 2 weeks!

Patience and persistence is required to learn anything… especially SmartThings. There’s no “SmartThings for Dummies” book or online lessons; so you have to spend a lot of time exploring and reading and experimenting with the simplest possible code … ideally for months.

There’s a ton of code here and other places: GitHub - SmartThingsCommunity/SmartThingsPublic: SmartThings open-source DeviceType Handlers and SmartApps code

4 Likes

Thanks mate. Motivates me alot. Gonna have to have more patience

2 Likes