mqtt: always send globally, always retain, thermostat und windowContact completed

This commit is contained in:
Wolfgang Hottgenroth
2018-01-15 17:10:42 +01:00
parent f88cf5ee0d
commit 09a63fe736
8 changed files with 179 additions and 32 deletions

26
dist/MaxWindowContact.js vendored Normal file
View File

@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const MqttDispatcher_1 = require("./MqttDispatcher");
const AHomematicItem_1 = require("./AHomematicItem");
// import { SwitchExport, ExportType } from './Export'
class MaxWindowContact extends AHomematicItem_1.AHomematicItem {
getStateFeedbackTopic() {
return this.stateFeedbackTopic;
}
constructor(floor, room, item, label, hmId) {
super(floor, room, item, label, hmId);
this.stateTopic = `${this.topicFirstPart}/state`;
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`;
this.deviceFeedbackTopic = `${this.deviceTopicPre}/1/STATE`;
this.subscribeTopics = [
this.stateTopic,
this.deviceFeedbackTopic
];
}
processMessage(topic, payload) {
this.state = payload;
MqttDispatcher_1.mqttHandler.send(this.stateFeedbackTopic, this.state);
}
}
exports.MaxWindowContact = MaxWindowContact;
//# sourceMappingURL=MaxWindowContact.js.map