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>
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