mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-08-25 20:20:00 +00:00
Always log 'No converter available...` to debug. #2543
This commit is contained in:
@@ -109,9 +109,7 @@ class DeviceReceive extends BaseExtension {
|
||||
|
||||
// Check if there is an available converter
|
||||
if (!converters.length) {
|
||||
// Don't log readRsp and raw as warn messages, they are not interesting most of the time.
|
||||
const level = ['readResponse', 'raw'].includes(data.type) ? 'debug' : 'warn';
|
||||
logger[level](
|
||||
logger.debug(
|
||||
`No converter available for '${mappedDevice.model}' with cluster '${data.cluster}' ` +
|
||||
`and type '${data.type}' and data '${JSON.stringify(data.data)}'`,
|
||||
);
|
||||
|
||||
@@ -385,17 +385,7 @@ describe('Device receive', () => {
|
||||
await zigbeeHerdsman.events.message(payload);
|
||||
await flushPromises();
|
||||
expect(MQTT.publish).toHaveBeenCalledTimes(0);
|
||||
expect(logger.warn).toHaveBeenCalledWith('No converter available for \'ZNCZ02LM\' with cluster \'genBinaryOutput\' and type \'attributeReport\' and data \'{"inactiveText":"hello"}\'');
|
||||
});
|
||||
|
||||
it('Should not log when message is from supported device but has no converters is readResponse', async () => {
|
||||
const device = zigbeeHerdsman.devices.ZNCZ02LM;
|
||||
const data = {inactiveText: 'hello'};
|
||||
const payload = {data, cluster: 'genBinaryOutput', device, endpoint: device.getEndpoint(1), type: 'readResponse', linkquality: 20};
|
||||
await zigbeeHerdsman.events.message(payload);
|
||||
await flushPromises();
|
||||
expect(MQTT.publish).toHaveBeenCalledTimes(0);
|
||||
expect(logger.warn).toBeCalledTimes(0);
|
||||
expect(logger.debug).toHaveBeenCalledWith('No converter available for \'ZNCZ02LM\' with cluster \'genBinaryOutput\' and type \'attributeReport\' and data \'{"inactiveText":"hello"}\'');
|
||||
});
|
||||
|
||||
it('Should allow to calibrate temperature values', async () => {
|
||||
|
||||
Reference in New Issue
Block a user