Skip to content

Commit

Permalink
homekit: fix window covering target position binding (#1512)
Browse files Browse the repository at this point in the history
Co-authored-by: Jordan Steffan <[email protected]>
  • Loading branch information
jstef16 and Jordan Steffan authored Jun 28, 2024
1 parent a61d9af commit 5351d86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/homekit/src/types/windowcovering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ addSupportedType({

let targetPosition = !!device.entryOpen ? 100 : 0;
bindCharacteristic(device, ScryptedInterface.EntrySensor, service, Characteristic.TargetPosition,
() => targetPosition);
() => !!device.entryOpen ? 100 : 0);

const props = {
minValue: 0,
Expand All @@ -48,7 +48,7 @@ addSupportedType({

let targetPosition = device.brightness || 0;
bindCharacteristic(device, ScryptedInterface.Brightness, service, Characteristic.TargetPosition,
() => targetPosition);
() => device.brightness || 0);

const props = {
minValue: 0,
Expand Down

0 comments on commit 5351d86

Please sign in to comment.