introduce interfaces for state/feedback topics

This commit is contained in:
Wolfgang Hottgenroth
2018-01-11 13:52:09 +01:00
parent c7834fefb1
commit 28eec19e53
7 changed files with 92 additions and 54 deletions

View File

@ -4,6 +4,12 @@ const MqttDispatcher_1 = require("./MqttDispatcher");
const AItem_1 = require("./AItem");
const Export_1 = require("./Export");
class M433SwitchItem extends AItem_1.AItem {
getStateTopic() {
return this.stateTopic;
}
getStateFeedbackTopic() {
return this.stateFeedbackTopic;
}
constructor(floor, room, item, label, onCode, offCode, type = 'bulb') {
super(floor, room, item, label);
this.stateTopic = `${this.topicFirstPart}/state`;