rework thermostat
This commit is contained in:
13
dist/MaxWindowContact.js
vendored
13
dist/MaxWindowContact.js
vendored
@ -7,6 +7,19 @@ class MaxWindowContact extends AHomegearItem_1.AHomegearItem {
|
||||
getStateFeedbackTopic() {
|
||||
return this.stateFeedbackTopic;
|
||||
}
|
||||
transform(payload) {
|
||||
let res;
|
||||
if (payload == 'OPEN') {
|
||||
res = 'DISABLE';
|
||||
}
|
||||
else if (payload == 'CLOSED') {
|
||||
res = 'ENABLE';
|
||||
}
|
||||
else {
|
||||
res = 'UNKNOWN';
|
||||
}
|
||||
return res;
|
||||
}
|
||||
constructor(floor, room, item, label, hmId) {
|
||||
super(floor, room, item, label, hmId);
|
||||
this.stateTopic = `${this.topicFirstPart}/state`;
|
||||
|
Reference in New Issue
Block a user