Skip to content

Commit

Permalink
Online status
Browse files Browse the repository at this point in the history
  • Loading branch information
cpq committed Feb 15, 2024
1 parent c683e1e commit d128d21
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/mqtt-dashboard/dashboard/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,8 @@ const App = function() {
});
};

subscribe(statusTopic)
subscribe(txTopic)
subscribe(statusTopic);
subscribe(txTopic);
});

MqttClient.on('message', (topic, message) => {
Expand All @@ -472,7 +472,8 @@ const App = function() {
console.error('Invalid response');
return;
}
device.online = params.status === 'online'
device.online = params.status === 'online';
setConnected(device.online);
if (device.online) {
device.config = params;
if (!device.config.pins) device.config.pins = [];
Expand Down

0 comments on commit d128d21

Please sign in to comment.