mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-07-20 18:41:35 +00:00
Fix devices missing from UI after repair. https://github.com/nurikk/z2m-frontend/issues/746
This commit is contained in:
@@ -143,8 +143,8 @@ class Bridge extends Extension {
|
||||
);
|
||||
}
|
||||
|
||||
if ('deviceLeave' === type || ('deviceInterview' === type && data.status !== 'started') ||
|
||||
'deviceNetworkAddressChanged' === type) {
|
||||
if (['deviceLeave', 'deviceInterview', 'deviceNetworkAddressChanged',
|
||||
'deviceJoined', 'deviceAnnounce'].includes(type)) {
|
||||
await this.publishDevices();
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -139,7 +139,7 @@ describe('Bridge', () => {
|
||||
MQTT.publish.mockClear();
|
||||
await zigbeeHerdsman.events.deviceAnnounce({device: zigbeeHerdsman.devices.bulb});
|
||||
await flushPromises();
|
||||
expect(MQTT.publish).toHaveBeenCalledTimes(1);
|
||||
expect(MQTT.publish).toHaveBeenCalledTimes(2);
|
||||
expect(MQTT.publish).toHaveBeenCalledWith(
|
||||
'zigbee2mqtt/bridge/event',
|
||||
stringify({"type":"device_announce","data":{"friendly_name":"bulb","ieee_address":"0x000b57fffec6a5b2"}}),
|
||||
@@ -152,7 +152,7 @@ describe('Bridge', () => {
|
||||
MQTT.publish.mockClear();
|
||||
await zigbeeHerdsman.events.deviceInterview({device: zigbeeHerdsman.devices.bulb, status: 'started'});
|
||||
await flushPromises();
|
||||
expect(MQTT.publish).toHaveBeenCalledTimes(1);
|
||||
expect(MQTT.publish).toHaveBeenCalledTimes(2);
|
||||
expect(MQTT.publish).toHaveBeenCalledWith(
|
||||
'zigbee2mqtt/bridge/event',
|
||||
stringify({"type":"device_interview","data":{"friendly_name":"bulb","status":"started","ieee_address":"0x000b57fffec6a5b2"}}),
|
||||
|
||||
Reference in New Issue
Block a user