This commit is contained in:
Koen Kanters
2020-10-06 19:28:32 +02:00
parent 6ca8982237
commit e90182642d
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -392,6 +392,7 @@ class Bridge extends Extension {
logger.info(`Successfully removed ${entity.type} '${entity.settings.friendlyName}'${blockForceLog}`);
if (entity.type === 'device') {
this.publishGroups();
this.publishDevices();
return utils.getResponse(message, {id: ID, block, force}, null);
} else {
+2
View File
@@ -294,6 +294,8 @@ describe('Bridge', () => {
{retain: false, qos: 0}, expect.any(Function)
);
expect(settings.get().blocklist).toStrictEqual([]);
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/bridge/devices', expect.any(String), expect.any(Object), expect.any(Function));
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/bridge/groups', expect.any(String), expect.any(Object), expect.any(Function));
});
it('Should allow to remove device by object ID', async () => {