Skip to content

Commit

Permalink
Add Battery notifications to inbound notification
Browse files Browse the repository at this point in the history
  • Loading branch information
PoltoS committed Jan 16, 2023
1 parent fd50ba1 commit 8a69c05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/InbandNotifications/index.js
Expand Up @@ -72,7 +72,7 @@ InbandNotifications.prototype.init = function (config) {
};
var msgType = "";

if (lastEvent.l === level && ["sensorBinary", "sensorDiscrete", "toggleButton", "switchControl"].indexOf(devType) === - 1) return; // emit only for new values (not same as previous) or sensorBinary/sensorDiscrete/toggleButton/switchControl events
if (lastEvent.l === level && ["battery", "sensorBinary", "sensorDiscrete", "toggleButton", "switchControl"].indexOf(devType) === - 1) return; // emit only for new values (not same as previous) or sensorBinary/sensorDiscrete/toggleButton/switchControl events

// depending on device type choose the correct notification
switch(devType) {
Expand All @@ -91,6 +91,7 @@ InbandNotifications.prototype.init = function (config) {
case 'sensorDiscrete':
msgType = 'device-status';
break;
case 'battery':
case 'sensorMultilevel':
case 'sensorMultiline':
case 'thermostat':
Expand Down

0 comments on commit 8a69c05

Please sign in to comment.