Log failed to ping as warning instead of error. https://github.com/Koenkk/zigbee2mqtt/issues/9700

This commit is contained in:
Koen Kanters 2021-11-21 22:10:33 +01:00
parent ad3ff7fa40
commit 5e3b18a053

View File

@ -77,7 +77,7 @@ export default class Availability extends Extension {
logger.debug(`Succesfully pinged '${device.name}' (attempt ${i + 1}/${attempts})`);
break;
} catch (error) {
logger.error(`Failed to ping '${device.name}' (attempt ${i + 1}/${attempts}, ${error.message})`);
logger.warn(`Failed to ping '${device.name}' (attempt ${i + 1}/${attempts}, ${error.message})`);
// Try again in 3 seconds.
const lastAttempt = i - 1 === attempts;
!lastAttempt && await utils.sleep(3);