"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) { if (payload == 'true') { this.state = 'OPEN'; } else { this.state = 'CLOSED'; } MqttDispatcher_1.mqttHandler.send(this.stateFeedbackTopic, this.state); } } exports.MaxWindowContact = MaxWindowContact; //# sourceMappingURL=MaxWindowContact.js.map