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() {
|
function handleQuit() {
|
||||||
|
mqttPublish(`${settings.mqtt.base_topic}/bridge/state`, 'offline', true);
|
||||||
|
|
||||||
shepherd.stop((err) => {
|
shepherd.stop((err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
logger.error('Error while stopping zigbee-shepherd');
|
logger.error('Error while stopping zigbee-shepherd');
|
||||||
@ -188,7 +190,6 @@ function handleQuit() {
|
|||||||
logger.error('zigbee-shepherd stopped')
|
logger.error('zigbee-shepherd stopped')
|
||||||
}
|
}
|
||||||
|
|
||||||
mqttPublish(`${settings.mqtt.base_topic}/bridge/state`, 'offline', true);
|
|
||||||
process.exit();
|
process.exit();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user