add all existing items, homekit export
This commit is contained in:
9
dist/M433SwitchItem.js
vendored
9
dist/M433SwitchItem.js
vendored
@ -2,9 +2,10 @@
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const MqttDispatcher_1 = require("./MqttDispatcher");
|
||||
const AItem_1 = require("./AItem");
|
||||
const Export_1 = require("./Export");
|
||||
class M433SwitchItem extends AItem_1.AItem {
|
||||
constructor(floor, room, item, onCode, offCode) {
|
||||
super(floor, room, item);
|
||||
constructor(floor, room, item, label, onCode, offCode, type = 'bulb') {
|
||||
super(floor, room, item, label);
|
||||
this.stateTopic = `${this.topicFirstPart}/state`;
|
||||
this.subscribeTopics = [this.stateTopic];
|
||||
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`;
|
||||
@ -13,6 +14,10 @@ class M433SwitchItem extends AItem_1.AItem {
|
||||
this.oldState = undefined;
|
||||
this.onCode = onCode;
|
||||
this.offCode = offCode;
|
||||
this.type = type;
|
||||
}
|
||||
exportHomekit() {
|
||||
return Export_1.SwitchHomekitExport(this.itemId, this.label, this.stateTopic, this.stateFeedbackTopic, this.type);
|
||||
}
|
||||
processMessage(topic, payload) {
|
||||
this.state = payload;
|
||||
|
Reference in New Issue
Block a user