Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add support for FilterMaintenanceAccessory
  • Loading branch information
gjvanderheiden committed Dec 10, 2020
commit a0e0bda11d2d7f78e49b26ee31a250d23b3effaf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ public interface AccessoryWithResetFilterIndication {
* Request to reset the filter level
*
* @param indication always 1, by HomeKit protocol. (to be ignored)
* @return a future that completes when the change is made
* @throws Exception when the change cannot be made
*/
CompletableFuture<Void> resetFilterIndication(Integer indication) throws Exception;
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,7 @@ protected CompletableFuture<JsonObjectBuilder> makeBuilder(int iid) {

@Override
protected CompletableFuture<Integer> getValue() {
if (getter.isPresent()) {
return getter.map(integerGetter -> integerGetter.get()).get();
} else {
return null;
}
return getter.map(integerGetter -> integerGetter.get()).orElse(null);
}

@Override
Expand Down