Add option to enable livolo code. #592

This commit is contained in:
Koen Kanters committed 2019-02-04 18:39:45 +01:00
1 parent c9c599b60b
commit 7642b295e1
2 files changed
+11 -3

No files matched your search

+8 -3
View File
@@ -22,7 +22,7 @@ const ExtensionAvailability = require('./extension/availability');
const ExtensionBind = require('./extension/bind');
const ExtensionCoordinatorGroup = require('./extension/coordinatorGroup');
const ExtensionReporting = require('./extension/reporting');
// const ExtensionPollLivoloSwitch = require('./extension/pollLivoloSwitch');
const ExtensionPollLivoloSwitch = require('./extension/pollLivoloSwitch');
class Controller {
constructor() {
@@ -49,8 +49,6 @@ class Controller {
new ExtensionBind(this.zigbee, this.mqtt, this.state, this.publishEntityState),
new ExtensionCoordinatorGroup(this.zigbee, this.mqtt, this.state, this.publishEntityState),
new ExtensionReporting(this.zigbee, this.mqtt, this.state, this.publishEntityState),
// https://github.com/Koenkk/zigbee2mqtt/issues/592
// new ExtensionPollLivoloSwitch(this.zigbee, this.mqtt, this.state, this.publishEntityState),
];
if (settings.get().homeassistant) {
@@ -70,6 +68,13 @@ class Controller {
this.zigbee, this.mqtt, this.state, this.publishEntityState
));
}
if (settings.get().experimental.livolo) {
// https://github.com/Koenkk/zigbee2mqtt/issues/592
this.extensions.push(new ExtensionPollLivoloSwitch(
this.zigbee, this.mqtt, this.state, this.publishEntityState
));
}
}
onMQTTConnected() {