Skip to content

Commit

Permalink
Fix open issues
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Hilbush <[email protected]>
  • Loading branch information
mhilbush committed Jan 16, 2025
1 parent baaaf7f commit 097696a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public CreateVacationFunction(@Nullable String name, @Nullable QuantityType<Temp
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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -396,7 +398,12 @@ private void updateRuntime(@Nullable RuntimeDTO runtime) {
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));
Expand Down

0 comments on commit 097696a

Please sign in to comment.