]> git.basschouten.com Git - openhab-addons.git/commitdiff
[homekit] fix thermostats with auto mode and only target temperature (#17136)
authorCody Cutrer <cody@cutrer.us>
Wed, 24 Jul 2024 07:10:46 +0000 (01:10 -0600)
committerGitHub <noreply@github.com>
Wed, 24 Jul 2024 07:10:46 +0000 (09:10 +0200)
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 <cody@cutrer.us>
bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitThermostatImpl.java

index b1bbb1e0976864c194cfa3413d6f32d943772ec3..fbbe9401c4258df1ce1e8278888ad6f09edb58f4 100644 (file)
@@ -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