mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-08-28 05:24:29 +00:00
Republish bridge info on log level changes #3281
This commit is contained in:
@@ -165,6 +165,7 @@ class Bridge extends Extension {
|
||||
}
|
||||
|
||||
logger.setLevel(value);
|
||||
this.publishInfo();
|
||||
return utils.getResponse(message, {value}, null);
|
||||
}
|
||||
|
||||
|
||||
@@ -530,6 +530,7 @@ describe('Bridge', () => {
|
||||
MQTT.events.message('zigbee2mqtt/bridge/request/config/logLevel', 'debug');
|
||||
await flushPromises();
|
||||
expect(logger.getLevel()).toBe('debug');
|
||||
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/bridge/info', expect.any(String), expect.any(Object), expect.any(Function));
|
||||
expect(MQTT.publish).toHaveBeenCalledWith(
|
||||
'zigbee2mqtt/bridge/response/config/logLevel',
|
||||
JSON.stringify({"data":{"value":'debug'},"status":"ok"}),
|
||||
|
||||
Reference in New Issue
Block a user