mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-07-09 13:31:41 +00:00
Refactor homeassistant configuration out of devices.js. #45
This commit is contained in:
+2
-2
@@ -49,7 +49,7 @@ class Controller {
|
||||
// MQTT discovery of all paired devices on startup.
|
||||
this.zigbee.getAllClients().forEach((device) => {
|
||||
if (deviceMapping[device.modelId]) {
|
||||
homeassistant.discover(device.ieeeAddr, deviceMapping[device.modelId].homeassistant, this.mqtt);
|
||||
homeassistant.discover(device.ieeeAddr, deviceMapping[device.modelId].model, this.mqtt);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -127,7 +127,7 @@ class Controller {
|
||||
|
||||
// Home Assistant MQTT discovery
|
||||
if (settings.get().homeassistant) {
|
||||
homeassistant.discover(device.ieeeAddr, mappedModel.homeassistant, this.mqtt);
|
||||
homeassistant.discover(device.ieeeAddr, mappedModel.model, this.mqtt);
|
||||
}
|
||||
|
||||
// After this point we cant handle message withoud cid anymore.
|
||||
|
||||
Reference in New Issue
Block a user