rework thermostat

This commit is contained in:
2018-04-06 23:00:41 +02:00
parent 9db2aebf09
commit 37acc620d5
9 changed files with 134 additions and 50 deletions

View File

@ -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`;