mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-16 10:28:33 -07:00
Added MQTT logging to TouchLink Reset process (#3053)
* MQTT logging for TouchLink reset process * Changed status to be in meta * Update bridgeConfig.js Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
This commit is contained in:
parent
dc8b6c5294
commit
2454136b9b
@ -371,12 +371,15 @@ class BridgeConfig extends BaseExtension {
|
||||
|
||||
async touchlinkFactoryReset() {
|
||||
logger.info('Starting touchlink factory reset...');
|
||||
this.mqtt.log('touchlink', 'reset_started', {status: 'started'});
|
||||
const result = await this.zigbee.touchlinkFactoryReset();
|
||||
|
||||
if (result) {
|
||||
logger.info('Successfully factory reset device through Touchlink');
|
||||
this.mqtt.log('touchlink', 'reset_success', {status: 'success'});
|
||||
} else {
|
||||
logger.warn('Failed to factory reset device through Touchlink');
|
||||
this.mqtt.log('touchlink', 'reset_failed', {status: 'failed'});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user