mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-10-22 22:11:22 +00:00
Fix homeassistant discover crash when device undefined.
This commit is contained in:
1 parent
a13080f399
commit
875ca536e0
1 file changed
+3
-1
+3
-1
@@ -36,7 +36,9 @@ class Controller {
|
||||
if (settings.get().homeassistant) {
|
||||
// MQTT discovery of all paired devices on startup.
|
||||
this.zigbee.getAllClients().forEach((device) => {
|
||||
homeassistant.discover(device.ieeeAddr, deviceMapping[device.modelId].homeassistant, this.mqtt);
|
||||
if (deviceMapping[device.modelId]) {
|
||||
homeassistant.discover(device.ieeeAddr, deviceMapping[device.modelId].homeassistant, this.mqtt);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user