Skip to content

Commit

Permalink
remove setter for current level.
Browse files Browse the repository at this point in the history
Setting the "current level" causes errors at least for "FYRTUR block-out
roller blind" devices (despite the fact that the "blindsCurrentLevel"
attribute is listed as set-able in json dump. Thinking about it setting
the current level doesnt make a whole lot of sense either.
  • Loading branch information
Sebastian Cramer committed Jul 30, 2023
1 parent e637f64 commit fc0d1d4
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,6 @@ public Mono<BlindsDevice> setTargetLevel(final BlindsDevice device, final Intege
.flatMap(d -> this.setStateAttribute(d, attributes));
}

public Mono<BlindsDevice> setCurrentLevel(final BlindsDevice device, final Integer currentLevel) {
final BlindsStateAttributes attributes;

if (currentLevel < 0 || currentLevel > 100)
return Mono.error(new IllegalArgumentException("Target level must be between 0 and 100"));

attributes = new BlindsStateAttributes();
attributes.blindsCurrentLevel = currentLevel;

return this.assertCapability(device, "blindsCurrentLevel")
.flatMap(d -> this.setStateAttribute(d, attributes));
}

public Mono<BlindsDevice> setState(final BlindsDevice device, final BlindsState state) {
final BlindsStateAttributes attributes;

Expand Down

0 comments on commit fc0d1d4

Please sign in to comment.