Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[homekit] Fix invertedness of GarageDoorOpener characteristics #17181

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ private static CoolingThresholdTemperatureCharacteristic createCoolingThresholdC
private static CurrentDoorStateCharacteristic createCurrentDoorStateCharacteristic(HomekitTaggedItem taggedItem,
HomekitAccessoryUpdater updater) {
List<CurrentDoorStateEnum> validValues = new ArrayList<>();
var map = createMapping(taggedItem, CurrentDoorStateEnum.class, validValues);
var map = createMapping(taggedItem, CurrentDoorStateEnum.class, validValues, true);
return new CurrentDoorStateCharacteristic(() -> getEnumFromItem(taggedItem, map, CurrentDoorStateEnum.CLOSED),
getSubscriber(taggedItem, CURRENT_DOOR_STATE, updater),
getUnsubscriber(taggedItem, CURRENT_DOOR_STATE, updater));
Expand Down Expand Up @@ -1427,7 +1427,7 @@ private static SwingModeCharacteristic createSwingModeCharacteristic(HomekitTagg
private static TargetDoorStateCharacteristic createTargetDoorStateCharacteristic(HomekitTaggedItem taggedItem,
HomekitAccessoryUpdater updater) {
List<TargetDoorStateEnum> validValues = new ArrayList<>();
var map = createMapping(taggedItem, TargetDoorStateEnum.class, validValues);
var map = createMapping(taggedItem, TargetDoorStateEnum.class, validValues, true);
return new TargetDoorStateCharacteristic(() -> getEnumFromItem(taggedItem, map, TargetDoorStateEnum.CLOSED),
(targetState) -> setValueFromEnum(taggedItem, targetState, map),
getSubscriber(taggedItem, TARGET_DOOR_STATE, updater),
Expand Down