Fix open issues (#18113)

Signed-off-by: Mark Hilbush <mark@hilbush.com>
This commit is contained in:
Mark Hilbush 2025-01-16 16:33:01 -05:00 committed by GitHub
parent baaaf7f280
commit dfeac547ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View File

@ -51,8 +51,8 @@ public final class CreateVacationFunction extends AbstractFunction {
if (convertedCoolHoldTemp == null || convertedHeatHoldTemp == null) {
throw new IllegalArgumentException("coolHoldTemp or heatHoldTemp are not proper QuantityTypes");
}
params.put("coolHoldTemp", Integer.valueOf(convertedCoolHoldTemp.intValue()));
params.put("heatHoldTemp", Integer.valueOf(convertedHeatHoldTemp.intValue()));
params.put("coolHoldTemp", Integer.valueOf(convertedCoolHoldTemp.intValue() * 10));
params.put("heatHoldTemp", Integer.valueOf(convertedHeatHoldTemp.intValue() * 10));
if (startDateTime != null) {
params.put("startDate", YMD.format(startDateTime));

View File

@ -87,6 +87,8 @@ public class EcobeeThermostatBridgeHandler extends BaseBridgeHandler {
private final Logger logger = LoggerFactory.getLogger(EcobeeThermostatBridgeHandler.class);
private static final int MIN_VALID_ACTUAL_TEMPERATURE = 0;
private TimeZoneProvider timeZoneProvider;
private ChannelTypeRegistry channelTypeRegistry;
@ -396,7 +398,12 @@ public class EcobeeThermostatBridgeHandler extends BaseBridgeHandler {
EcobeeUtils.undefOrDate(runtime.lastStatusModified, timeZoneProvider));
updateChannel(grp + CH_RUNTIME_DATE, EcobeeUtils.undefOrString(runtime.runtimeDate));
updateChannel(grp + CH_RUNTIME_INTERVAL, EcobeeUtils.undefOrDecimal(runtime.runtimeInterval));
updateChannel(grp + CH_ACTUAL_TEMPERATURE, EcobeeUtils.undefOrTemperature(runtime.actualTemperature));
if (runtime.actualTemperature > MIN_VALID_ACTUAL_TEMPERATURE) {
updateChannel(grp + CH_ACTUAL_TEMPERATURE, EcobeeUtils.undefOrTemperature(runtime.actualTemperature));
} else {
logger.debug("Skipping update of actual temperature because temperature {} below min threshold of {}",
runtime.actualTemperature, MIN_VALID_ACTUAL_TEMPERATURE);
}
updateChannel(grp + CH_ACTUAL_HUMIDITY, EcobeeUtils.undefOrQuantity(runtime.actualHumidity, Units.PERCENT));
updateChannel(grp + CH_RAW_TEMPERATURE, EcobeeUtils.undefOrTemperature(runtime.rawTemperature));
updateChannel(grp + CH_SHOW_ICON_MODE, EcobeeUtils.undefOrDecimal(runtime.showIconMode));