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

Misleading name/value for "contact" #79

Open sdalu opened 2 years ago

sdalu commented 2 years ago

A value of 1 for "contact" means the contact is "open". But when we read "contact == 1" we tend to naturally interpret it as "there is a contact" (so it is closed)

otaviojr commented 2 years ago

Hi @sdalu,

in the latest version, I created an option in the open-close configuring dialog.

Use "closed" as active state.

You can use it to change this behavior.

I didn't change the default behavior because this code is available for some years now and I didn't want to break someone's else flows.

And that is really trick... in my case, I want to know if my door is open. So makes sense for my use case that "1" means doors open.

I think that having this option will allow to have more meaning in both cases.

Regards, Otávio Ribeiro