Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
NebzHB authored Jan 20, 2024
1 parent 6fb237c commit 7adf50f
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,9 @@ JeedomPlatform.prototype.AccessoireCreateHomebridge = function(eqLogic) {
Serv.eqLogic=eqLogic;
Serv.actions={};
Serv.infos={};
if(cmd.moving) {
Serv.infos.moving=cmd.moving;
}
if(cmd.stateClosing) {
Serv.infos.state=cmd.stateClosing;
if(Serv.infos.state.subType == 'binary') {
Expand Down Expand Up @@ -4579,7 +4582,30 @@ JeedomPlatform.prototype.getAccessoryValue = function(characteristic, service, i
}
break;
case Characteristic.PositionState.UUID :
returnValue = Characteristic.PositionState.STOPPED;
if(moving in service.infos) {

Check failure on line 4585 in index.js

View workflow job for this annotation

GitHub Actions / build (18.x)

'moving' is not defined

Check failure on line 4585 in index.js

View workflow job for this annotation

GitHub Actions / build (20.x)

'moving' is not defined

Check failure on line 4585 in index.js

View workflow job for this annotation

GitHub Actions / build (21.x)

'moving' is not defined
for (const cmd of cmdList) {
if (cmd.generic_type == 'FLAP_MOVING' || cmd.generic_type == 'WINDOW_MOVING') {
switch(parseInt(cmd.currentValue)) {
case 0 :
returnValue=Characteristic.PositionState.DECREASING;
break;
case 1 :
returnValue=Characteristic.PositionState.INCREASING;
break;
case 2 :
returnValue=Characteristic.PositionState.STOPPED;
break;
default :
returnValue=Characteristic.PositionState.STOPPED;
break;
}
that.log('debug','---------update PositionState:',returnValue);
break;
}
}
} else {
returnValue = Characteristic.PositionState.STOPPED;
}
break;
case Characteristic.CurrentHorizontalTiltAngle.UUID :
case Characteristic.TargetHorizontalTiltAngle.UUID :
Expand Down

0 comments on commit 7adf50f

Please sign in to comment.