mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-16 10:28:33 -07:00
Move mqtt bridge state.
This commit is contained in:
parent
fa61d17f0b
commit
8d9911b4b5
3
index.js
3
index.js
@ -181,6 +181,8 @@ function handleMessage(msg) {
|
||||
}
|
||||
|
||||
function handleQuit() {
|
||||
mqttPublish(`${settings.mqtt.base_topic}/bridge/state`, 'offline', true);
|
||||
|
||||
shepherd.stop((err) => {
|
||||
if (err) {
|
||||
logger.error('Error while stopping zigbee-shepherd');
|
||||
@ -188,7 +190,6 @@ function handleQuit() {
|
||||
logger.error('zigbee-shepherd stopped')
|
||||
}
|
||||
|
||||
mqttPublish(`${settings.mqtt.base_topic}/bridge/state`, 'offline', true);
|
||||
process.exit();
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user