Skip to content

Commit

Permalink
Merge pull request aholstenson#103 from pierrecle/master
Browse files Browse the repository at this point in the history
fix(magnet): revert open/close
  • Loading branch information
aholstenson authored Jan 25, 2018
2 parents 1ff4a41 + 3c4ff0a commit bb2bc35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/devices/gateway/magnet.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ module.exports = class Magnet extends SubDevice.with(Contact, Voltage) {
propertyUpdated(key, value, oldValue) {
if(key === 'status') {
// Change the contact state
const isOpen = value === 'open';
this.updateContact(isOpen);
const isContact = value === 'close';
this.updateContact(isContact);
}

super.propertyUpdated(key, value, oldValue);
Expand Down

0 comments on commit bb2bc35

Please sign in to comment.