Skip to content

Commit

Permalink
fix WATER_LEAK
Browse files Browse the repository at this point in the history
  • Loading branch information
NebzHB authored Nov 22, 2024
1 parent d804c22 commit ffaae3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4019,7 +4019,7 @@ JeedomPlatform.prototype.getAccessoryValue = function(characteristic, service, i
break;
case Characteristic.LeakDetected.UUID :
for (const cmd of cmdList) {
if (cmd.generic_type == 'FLOOD' && cmd.id == service.cmd_id) {
if ((cmd.generic_type == 'FLOOD' || cmd.generic_type == 'WATER_LEAK') && cmd.id == service.cmd_id) {
// returnValue = parseInt(service.invertBinary)==0 ? toBool(cmd.currentValue) : !toBool(cmd.currentValue); // invertBinary ? // no need to invert
returnValue = toBool(cmd.currentValue);
if(returnValue === false) {
Expand Down

0 comments on commit ffaae3c

Please sign in to comment.