diff --git a/bundles/org.openhab.io.homekit/README.md b/bundles/org.openhab.io.homekit/README.md index 91fe8a3e1f121..9c8d5d70cfe5b 100644 --- a/bundles/org.openhab.io.homekit/README.md +++ b/bundles/org.openhab.io.homekit/README.md @@ -724,6 +724,25 @@ All enum values can be customized via item metadata. I.e. `HEAT="heating", COOL= They are appropriately marked. Enums that are linked to Switches or Contacts have an `inverted` param that will reverse the sense of `ON`/`OFF` or `OPEN`/`CLOSED`. +Enum mappings can have multiple values for a single key. +These must be an array, not a comma separated string. +If the characteristic can be set by HomeKit, the first value will be used when sending the command to the linked item. +Such a mapping can be configured manually in MainUI on HomeKit metadata in the Code editor: +```yaml +value: "Lock" +config: + SECURE: + - LOCK + - LOCKED + UNSECURE: + - UNLOCK + - UNLOCKED +``` +Or in a `.items` file: +```java +String MyLock "My Lock" { homekit="Lock"[SECURE="LOCK","LOCKED", UNSECURE="UNLOCK","UNLOCKED"] } +``` + All accessories support the following characteristics that can be set via metadata or linked to a String item: * Name (defaults to item's label) * Manufacturer (defaults to "none") diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/AbstractHomekitAccessoryImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/AbstractHomekitAccessoryImpl.java index 5a85d496244f9..fcca4fb6ad15f 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/AbstractHomekitAccessoryImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/AbstractHomekitAccessoryImpl.java @@ -372,19 +372,19 @@ protected T getAccessoryConfiguration(HomekitCharacteristicType characterist } @NonNullByDefault - protected & CharacteristicEnum> Map createMapping( + protected & CharacteristicEnum> Map createMapping( HomekitCharacteristicType characteristicType, Class klazz) { return createMapping(characteristicType, klazz, null, false); } @NonNullByDefault - protected & CharacteristicEnum> Map createMapping( + protected & CharacteristicEnum> Map createMapping( HomekitCharacteristicType characteristicType, Class klazz, boolean inverted) { return createMapping(characteristicType, klazz, null, inverted); } @NonNullByDefault - protected & CharacteristicEnum> Map createMapping( + protected & CharacteristicEnum> Map createMapping( HomekitCharacteristicType characteristicType, Class klazz, @Nullable List customEnumList) { return createMapping(characteristicType, klazz, customEnumList, false); } @@ -398,7 +398,7 @@ protected & CharacteristicEnum> Map createMapping( * @return mapping of enum values to custom string values */ @NonNullByDefault - protected & CharacteristicEnum> Map createMapping( + protected & CharacteristicEnum> Map createMapping( HomekitCharacteristicType characteristicType, Class klazz, @Nullable List customEnumList, boolean inverted) { HomekitTaggedItem item = getCharacteristic(characteristicType).get(); @@ -416,7 +416,7 @@ protected & CharacteristicEnum> Map createMapping( * @return key for the value */ @NonNullByDefault - public T getKeyFromMapping(HomekitCharacteristicType characteristicType, Map mapping, + public T getKeyFromMapping(HomekitCharacteristicType characteristicType, Map mapping, T defaultValue) { final Optional c = getCharacteristic(characteristicType); if (c.isPresent()) { diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/AbstractHomekitPositionAccessoryImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/AbstractHomekitPositionAccessoryImpl.java index 21fdf09349982..c54047fa98190 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/AbstractHomekitPositionAccessoryImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/AbstractHomekitPositionAccessoryImpl.java @@ -53,7 +53,7 @@ abstract class AbstractHomekitPositionAccessoryImpl extends AbstractHomekitAcces private final Logger logger = LoggerFactory.getLogger(AbstractHomekitPositionAccessoryImpl.class); protected int closedPosition; protected int openPosition; - private final Map positionStateMapping; + private final Map positionStateMapping; protected boolean emulateState; protected boolean emulateStopSameDirection; protected boolean sendUpDownForExtents; diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitAirQualitySensorImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitAirQualitySensorImpl.java index 946201b0d9058..5b9059c865f5f 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitAirQualitySensorImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitAirQualitySensorImpl.java @@ -35,7 +35,7 @@ * @author Eugen Freiter - Initial contribution */ public class HomekitAirQualitySensorImpl extends AbstractHomekitAccessoryImpl implements AirQualityAccessory { - private final Map qualityStateMapping; + private final Map qualityStateMapping; public HomekitAirQualitySensorImpl(HomekitTaggedItem taggedItem, List mandatoryCharacteristics, List mandatoryRawCharacteristics, HomekitAccessoryUpdater updater, HomekitSettings settings) diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCarbonDioxideSensorImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCarbonDioxideSensorImpl.java index d8a099b802f36..daef40df3c48d 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCarbonDioxideSensorImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCarbonDioxideSensorImpl.java @@ -35,7 +35,7 @@ */ public class HomekitCarbonDioxideSensorImpl extends AbstractHomekitAccessoryImpl implements CarbonDioxideSensorAccessory { - private final Map mapping; + private final Map mapping; public HomekitCarbonDioxideSensorImpl(HomekitTaggedItem taggedItem, List mandatoryCharacteristics, List mandatoryRawCharacteristics, diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCarbonMonoxideSensorImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCarbonMonoxideSensorImpl.java index 179c223434f9e..51ab51f6eecf9 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCarbonMonoxideSensorImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCarbonMonoxideSensorImpl.java @@ -35,7 +35,7 @@ */ public class HomekitCarbonMonoxideSensorImpl extends AbstractHomekitAccessoryImpl implements CarbonMonoxideSensorAccessory { - private final Map mapping; + private final Map mapping; public HomekitCarbonMonoxideSensorImpl(HomekitTaggedItem taggedItem, List mandatoryCharacteristics, List mandatoryRawCharacteristics, diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCharacteristicFactory.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCharacteristicFactory.java index 851d0ac330464..97260d5898a70 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCharacteristicFactory.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCharacteristicFactory.java @@ -26,6 +26,7 @@ import java.util.function.BiFunction; import java.util.function.Consumer; import java.util.function.Supplier; +import java.util.stream.Collectors; import javax.measure.Quantity; import javax.measure.Unit; @@ -322,9 +323,9 @@ public static Characteristic createCharacteristic(HomekitTaggedItem item, Homeki * associated with, which has already been set. * @return */ - public static & CharacteristicEnum> Map createMapping(HomekitTaggedItem item, + public static & CharacteristicEnum> Map createMapping(HomekitTaggedItem item, Class klazz, @Nullable List customEnumList, boolean inverted) { - EnumMap map = new EnumMap(klazz); + EnumMap map = new EnumMap(klazz); var dataTypes = item.getBaseItem().getAcceptedDataTypes(); boolean switchType = dataTypes.contains(OnOffType.class); boolean contactType = dataTypes.contains(OpenClosedType.class); @@ -362,9 +363,22 @@ public static & CharacteristicEnum> Map createMapp var configuration = item.getConfiguration(); if (configuration != null) { map.forEach((k, current_value) -> { - final Object newValue = configuration.get(k.toString()); - if (newValue instanceof String || newValue instanceof Number) { - map.put(k, newValue.toString()); + Object newValue = configuration.get(k.toString()); + if (newValue instanceof String || newValue instanceof Number || newValue instanceof List) { + if (newValue instanceof Number) { + newValue = newValue.toString(); + } else if (newValue instanceof List listValue) { + newValue = listValue.stream().map(v -> { + // they probably put "NULL" in the YAML in MainUI; + // and they meant it as a string to match the UnDefType.NULL + if (v == null) { + return "NULL"; + } else { + return v.toString(); + } + }).collect(Collectors.toList()); + } + map.put(k, Objects.requireNonNull(newValue)); if (customEnumList != null) { customEnumList.add(k); } @@ -385,17 +399,17 @@ public static & CharacteristicEnum> Map createMapp return map; } - public static & CharacteristicEnum> Map createMapping(HomekitTaggedItem item, + public static & CharacteristicEnum> Map createMapping(HomekitTaggedItem item, Class klazz) { return createMapping(item, klazz, null, false); } - public static & CharacteristicEnum> Map createMapping(HomekitTaggedItem item, + public static & CharacteristicEnum> Map createMapping(HomekitTaggedItem item, Class klazz, @Nullable List customEnumList) { return createMapping(item, klazz, customEnumList, false); } - public static & CharacteristicEnum> Map createMapping(HomekitTaggedItem item, + public static & CharacteristicEnum> Map createMapping(HomekitTaggedItem item, Class klazz, boolean inverted) { return createMapping(item, klazz, null, inverted); } @@ -410,7 +424,7 @@ public static & CharacteristicEnum> Map createMapp * @param type of the result derived from * @return key for the value */ - public static T getKeyFromMapping(HomekitTaggedItem item, State state, Map mapping, T defaultValue) { + public static T getKeyFromMapping(HomekitTaggedItem item, State state, Map mapping, T defaultValue) { LOGGER.trace("getKeyFromMapping: characteristic {}, state {}, mapping {}", item.getAccessoryType().getTag(), state, mapping); @@ -433,14 +447,23 @@ public static T getKeyFromMapping(HomekitTaggedItem item, State state, Map value.equalsIgnoreCase(entry.getValue())).findAny() - .map(Map.Entry::getKey).orElseGet(() -> { - LOGGER.warn( - "Wrong value {} for {} characteristic of the item {}. Expected one of following {}. Returning {}.", - state.toString(), item.getAccessoryType().getTag(), item.getName(), mapping.values(), - defaultValue); - return defaultValue; - }); + return mapping.entrySet().stream().filter(entry -> { + Object mappingValue = entry.getValue(); + if (mappingValue instanceof String stringValue) { + return value.equalsIgnoreCase(stringValue); + } else if (mappingValue instanceof List listValue) { + return listValue.stream().filter(listEntry -> value.equalsIgnoreCase(listEntry.toString())).findAny() + .isPresent(); + } else { + LOGGER.warn("Found unexpected enum value type {}; this is a bug.", mappingValue.getClass()); + return false; + } + }).findAny().map(Map.Entry::getKey).orElseGet(() -> { + LOGGER.warn( + "Wrong value {} for {} characteristic of the item {}. Expected one of following {}. Returning {}.", + state.toString(), item.getAccessoryType().getTag(), item.getName(), mapping.values(), defaultValue); + return defaultValue; + }); } // supporting methods @@ -465,18 +488,31 @@ public static Unit getSystemTemperatureUnit() { } private static CompletableFuture getEnumFromItem(HomekitTaggedItem item, - Map mapping, T defaultValue) { + Map mapping, T defaultValue) { return CompletableFuture .completedFuture(getKeyFromMapping(item, item.getItem().getState(), mapping, defaultValue)); } - public static > void setValueFromEnum(HomekitTaggedItem taggedItem, T value, Map map) { + public static > void setValueFromEnum(HomekitTaggedItem taggedItem, T value, Map map) { + Object mapValue = map.get(value); + // if the mapping has multiple values for this enum, just use the first one for the command sent to the item + if (mapValue instanceof List listValue) { + if (listValue.isEmpty()) { + mapValue = null; + } else { + mapValue = listValue.get(0); + } + } + if (mapValue == null) { + LOGGER.warn("Unable to find mapping value for {} for item {}", value, taggedItem.getName()); + return; + } if (taggedItem.getBaseItem() instanceof NumberItem) { - taggedItem.send(new DecimalType(Objects.requireNonNull(map.get(value)))); + taggedItem.send(new DecimalType(mapValue.toString())); } else if (taggedItem.getBaseItem() instanceof SwitchItem) { - taggedItem.send(OnOffType.from(Objects.requireNonNull(map.get(value)))); + taggedItem.send(OnOffType.from(mapValue.toString())); } else { - taggedItem.send(new StringType(map.get(value))); + taggedItem.send(new StringType(mapValue.toString())); } } @@ -1196,7 +1232,7 @@ private static PowerModeCharacteristic createPowerModeCharacteristic(HomekitTagg private static ProgrammableSwitchEventCharacteristic createProgrammableSwitchEventCharacteristic( HomekitTaggedItem taggedItem, HomekitAccessoryUpdater updater) { // have to build the map custom, since SINGLE_PRESS starts at 0 - Map map = new EnumMap(ProgrammableSwitchEnum.class); + Map map = new EnumMap(ProgrammableSwitchEnum.class); List validValues = new ArrayList<>(); if (taggedItem.getBaseItem().getAcceptedDataTypes().contains(OnOffType.class)) { @@ -1218,11 +1254,11 @@ private static ProgrammableSwitchEventCharacteristic createProgrammableSwitchEve private static class ProgrammableSwitchEventCharacteristicHelper { private @Nullable ProgrammableSwitchEnum lastValue = null; private final HomekitTaggedItem taggedItem; - private final Map map; + private final Map map; private final HomekitAccessoryUpdater updater; ProgrammableSwitchEventCharacteristicHelper(HomekitTaggedItem taggedItem, HomekitAccessoryUpdater updater, - Map map) { + Map map) { this.taggedItem = taggedItem; this.map = map; this.updater = updater; diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitContactSensorImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitContactSensorImpl.java index b02d6ad59e569..e0cd02e9ab1ea 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitContactSensorImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitContactSensorImpl.java @@ -34,7 +34,7 @@ * @author Philipp Arndt - Initial contribution */ public class HomekitContactSensorImpl extends AbstractHomekitAccessoryImpl implements ContactSensorAccessory { - private final Map mapping; + private final Map mapping; public HomekitContactSensorImpl(HomekitTaggedItem taggedItem, List mandatoryCharacteristics, List mandatoryRawCharacteristics, HomekitAccessoryUpdater updater, HomekitSettings settings) diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitFilterMaintenanceImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitFilterMaintenanceImpl.java index 2dcfcc046e103..272e4eb3d831b 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitFilterMaintenanceImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitFilterMaintenanceImpl.java @@ -35,7 +35,7 @@ * @author Eugen Freiter - Initial contribution */ public class HomekitFilterMaintenanceImpl extends AbstractHomekitAccessoryImpl implements FilterMaintenanceAccessory { - private final Map mapping; + private final Map mapping; public HomekitFilterMaintenanceImpl(HomekitTaggedItem taggedItem, List mandatoryCharacteristics, List mandatoryRawCharacteristics, HomekitAccessoryUpdater updater, HomekitSettings settings) diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitHeaterCoolerImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitHeaterCoolerImpl.java index 4a84ee72bb9f5..3d659a6591855 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitHeaterCoolerImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitHeaterCoolerImpl.java @@ -52,8 +52,8 @@ public class HomekitHeaterCoolerImpl extends AbstractHomekitAccessoryImpl implements HeaterCoolerAccessory { private final Logger logger = LoggerFactory.getLogger(HomekitHeaterCoolerImpl.class); private final BooleanItemReader activeReader; - private final Map currentStateMapping; - private final Map targetStateMapping; + private final Map currentStateMapping; + private final Map targetStateMapping; private final List customCurrentStateList = new ArrayList<>(); private final List customTargetStateList = new ArrayList<>(); diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitIrrigationSystemImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitIrrigationSystemImpl.java index 5b75f2de67543..15ea88a8fae53 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitIrrigationSystemImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitIrrigationSystemImpl.java @@ -46,8 +46,8 @@ */ @NonNullByDefault({}) public class HomekitIrrigationSystemImpl extends AbstractHomekitAccessoryImpl implements IrrigationSystemAccessory { - private Map inUseMapping; - private Map programModeMap; + private Map inUseMapping; + private Map programModeMap; public HomekitIrrigationSystemImpl(HomekitTaggedItem taggedItem, List mandatoryCharacteristics, List mandatoryRawCharacteristics, HomekitAccessoryUpdater updater, HomekitSettings settings) diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitLeakSensorImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitLeakSensorImpl.java index e059e19be1e2a..9bd3c7b0a901d 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitLeakSensorImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitLeakSensorImpl.java @@ -34,7 +34,7 @@ * @author Tim Harper - Initial contribution */ public class HomekitLeakSensorImpl extends AbstractHomekitAccessoryImpl implements LeakSensorAccessory { - private final Map mapping; + private final Map mapping; public HomekitLeakSensorImpl(HomekitTaggedItem taggedItem, List mandatoryCharacteristics, List mandatoryRawCharacteristics, HomekitAccessoryUpdater updater, HomekitSettings settings) diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitLockImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitLockImpl.java index 14e2a05f82d9e..1227744d71968 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitLockImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitLockImpl.java @@ -36,8 +36,8 @@ * */ public class HomekitLockImpl extends AbstractHomekitAccessoryImpl implements LockMechanismAccessory { - final Map currentStateMapping; - final Map targetStateMapping; + final Map currentStateMapping; + final Map targetStateMapping; public HomekitLockImpl(HomekitTaggedItem taggedItem, List mandatoryCharacteristics, List mandatoryRawCharacteristics, HomekitAccessoryUpdater updater, diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitOccupancySensorImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitOccupancySensorImpl.java index 54fc964b49410..c91e715de09f5 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitOccupancySensorImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitOccupancySensorImpl.java @@ -34,7 +34,7 @@ * @author Tim Harper - Initial contribution */ public class HomekitOccupancySensorImpl extends AbstractHomekitAccessoryImpl implements OccupancySensorAccessory { - private final Map mapping; + private final Map mapping; public HomekitOccupancySensorImpl(HomekitTaggedItem taggedItem, List mandatoryCharacteristics, List mandatoryRawCharacteristics, HomekitAccessoryUpdater updater, HomekitSettings settings) diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitSecuritySystemImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitSecuritySystemImpl.java index 1c4f623ea4149..aa768788e364d 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitSecuritySystemImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitSecuritySystemImpl.java @@ -43,8 +43,8 @@ * @author Cody Cutrer - Initial contribution */ public class HomekitSecuritySystemImpl extends AbstractHomekitAccessoryImpl implements SecuritySystemAccessory { - private final Map currentStateMapping; - private final Map targetStateMapping; + private final Map currentStateMapping; + private final Map targetStateMapping; private final List customCurrentStateList = new ArrayList<>(); private final List customTargetStateList = new ArrayList<>(); diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitSlatImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitSlatImpl.java index a8fe068033acf..1046a874ff560 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitSlatImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitSlatImpl.java @@ -36,7 +36,7 @@ */ public class HomekitSlatImpl extends AbstractHomekitAccessoryImpl implements SlatAccessory { private static final String CONFIG_TYPE = "type"; - private final Map currentSlatStateMapping; + private final Map currentSlatStateMapping; private final SlatTypeEnum slatType; public HomekitSlatImpl(HomekitTaggedItem taggedItem, List mandatoryCharacteristics, diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitSmartSpeakerImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitSmartSpeakerImpl.java index 231fcfb3d65b7..95f7dda6471b0 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitSmartSpeakerImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitSmartSpeakerImpl.java @@ -36,8 +36,8 @@ * @author Eugen Freiter - Initial contribution */ public class HomekitSmartSpeakerImpl extends AbstractHomekitAccessoryImpl implements SmartSpeakerAccessory { - private final Map currentMediaState; - private final Map targetMediaState; + private final Map currentMediaState; + private final Map targetMediaState; public HomekitSmartSpeakerImpl(HomekitTaggedItem taggedItem, List mandatoryCharacteristics, List mandatoryRawCharacteristics, HomekitAccessoryUpdater updater, diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitSmokeSensorImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitSmokeSensorImpl.java index a2f4c02fa915d..6dc4de5f07928 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitSmokeSensorImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitSmokeSensorImpl.java @@ -34,7 +34,7 @@ * @author Cody Cutrer - Initial contribution */ public class HomekitSmokeSensorImpl extends AbstractHomekitAccessoryImpl implements SmokeSensorAccessory { - private final Map mapping; + private final Map mapping; public HomekitSmokeSensorImpl(HomekitTaggedItem taggedItem, List mandatoryCharacteristics, List mandatoryRawCharacteristics, HomekitAccessoryUpdater updater, HomekitSettings settings)