export prepared
This commit is contained in:
6
dist/RelayBox.js
vendored
6
dist/RelayBox.js
vendored
@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const logger = require("./log");
|
||||
const MqttDispatcher_1 = require("./MqttDispatcher");
|
||||
const AItem_1 = require("./AItem");
|
||||
const Export_1 = require("./Export");
|
||||
class RelayBoxThing extends AItem_1.AItem {
|
||||
constructor(floor, room, item, deviceCommandTopic, deviceStatusTopic, itemNames) {
|
||||
super(floor, room, item, '');
|
||||
@ -18,10 +19,13 @@ class RelayBoxThing extends AItem_1.AItem {
|
||||
];
|
||||
this.oldSwitchStates = '';
|
||||
}
|
||||
exportItem() {
|
||||
return Export_1.RelayBoxExport(this.stateTopicPre, this.feedbackTopicPre, this.conflictTopicPre, this.itemNames);
|
||||
}
|
||||
processMessage(topic, payload) {
|
||||
// logger.info(`RT: ${topic}, ${payload}`)
|
||||
if (topic == this.deviceStatusTopic) {
|
||||
logger.info(`RT: status received`);
|
||||
// logger.info(`RT: status received`)
|
||||
this.status = JSON.parse(payload);
|
||||
let statusParsed = JSON.stringify(this.status);
|
||||
this.switchStates = JSON.stringify(this.status.data.switchStates);
|
||||
|
Reference in New Issue
Block a user