From: Cody Cutrer Date: Wed, 24 Jul 2024 07:10:46 +0000 (-0600) Subject: [homekit] fix thermostats with auto mode and only target temperature (#17136) X-Git-Url: https://git.basschouten.com/?a=commitdiff_plain;h=e9369b6956a3814705bae1b5d5dda3ecc87a68d6;p=openhab-addons.git [homekit] fix thermostats with auto mode and only target temperature (#17136) allow configuring such an accessory, and it's up to the user to be okay with how the Home app deals with it Signed-off-by: Cody Cutrer --- diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitThermostatImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitThermostatImpl.java index b1bbb1e097..fbbe9401c4 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitThermostatImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitThermostatImpl.java @@ -83,13 +83,6 @@ class HomekitThermostatImpl extends AbstractHomekitAccessoryImpl { var targetHeatingCoolingStateCharacteristic = getCharacteristic(TargetHeatingCoolingStateCharacteristic.class) .get(); - if (Arrays.stream(targetHeatingCoolingStateCharacteristic.getValidValues()) - .anyMatch(v -> v.equals(TargetHeatingCoolingStateEnum.AUTO)) - && (!coolingThresholdTemperatureCharacteristic.isPresent() - || !heatingThresholdTemperatureCharacteristic.isPresent())) { - throw new HomekitException( - "Both HeatingThresholdTemperature and CoolingThresholdTemperature must be provided if AUTO mode is allowed."); - } // TargetTemperature not provided; simulate by forwarding to HeatingThresholdTemperature and // CoolingThresholdTemperature