otaviojr / node-red-contrib-smartthings

Allows you to control your devices and get their status using NodeRed
MIT License
32 stars 16 forks source link

SmartThings Thermostat node is failing with an error that the `thermostat` capability is not a valid value #90

Closed johnwalicki closed 1 year ago

johnwalicki commented 1 year ago

The Thermostat node is failing with an error that the thermostat capability is not a valid value.

"Error: Request failed with status code 422: {"requestId":"213B4DE8-7542-462B-A461-A747B9652BD5","error":{"code":"ConstraintViolationError","message":"The request is malformed.","details":[{"code":"NotValidValue","target":"commands[0].capability","message":"thermostat is not a valid value.","details":[]}]}}"

I checked the SmartThings Documentation and see that the capability should be thermostatHeatingSetPoint

I have prepared a PR which fixes the capability for the various Thermostat capabilities. The PR modifies the smartthings/smartthings-thermostat.js file.

johnwalicki commented 1 year ago

I tested on my local Node-RED instance and the error is resolved with this patch.

johnwalicki commented 1 year ago

@otaviojr - When you return from your holiday break, can you take a look at my PR? It fixes this problem. Would like to see it merged upstream so I can move off my private fork.

otaviojr commented 1 year ago

John,

I managed to merge your code.

Sorry about the delay.

Thanks for helping!

An amazing 2023 for you with lots of code! :-)

regards, Otávio Ribeiro

On 16/12/2022 15:29, John Walicki wrote:

@otaviojr https://github.com/otaviojr - When you return from your holiday break, can you take a look at my PR? It fixes this problem. Would like to see it merged upstream so I can move off my private fork.

— Reply to this email directly, view it on GitHub https://github.com/otaviojr/node-red-contrib-smartthings/issues/90#issuecomment-1355384921, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWMITMTJJIGPCPAOKV6WZLWNSYJXANCNFSM6AAAAAAS2AT5W4. You are receiving this because you were mentioned.Message ID: @.***>