Skip to content

Commit dfeac54

Browse files
authored
Fix open issues (openhab#18113)
Signed-off-by: Mark Hilbush <[email protected]>
1 parent baaaf7f commit dfeac54

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

bundles/org.openhab.binding.ecobee/src/main/java/org/openhab/binding/ecobee/internal/function/CreateVacationFunction.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public CreateVacationFunction(@Nullable String name, @Nullable QuantityType<Temp
5151
if (convertedCoolHoldTemp == null || convertedHeatHoldTemp == null) {
5252
throw new IllegalArgumentException("coolHoldTemp or heatHoldTemp are not proper QuantityTypes");
5353
}
54-
params.put("coolHoldTemp", Integer.valueOf(convertedCoolHoldTemp.intValue()));
55-
params.put("heatHoldTemp", Integer.valueOf(convertedHeatHoldTemp.intValue()));
54+
params.put("coolHoldTemp", Integer.valueOf(convertedCoolHoldTemp.intValue() * 10));
55+
params.put("heatHoldTemp", Integer.valueOf(convertedHeatHoldTemp.intValue() * 10));
5656

5757
if (startDateTime != null) {
5858
params.put("startDate", YMD.format(startDateTime));

bundles/org.openhab.binding.ecobee/src/main/java/org/openhab/binding/ecobee/internal/handler/EcobeeThermostatBridgeHandler.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ public class EcobeeThermostatBridgeHandler extends BaseBridgeHandler {
8787

8888
private final Logger logger = LoggerFactory.getLogger(EcobeeThermostatBridgeHandler.class);
8989

90+
private static final int MIN_VALID_ACTUAL_TEMPERATURE = 0;
91+
9092
private TimeZoneProvider timeZoneProvider;
9193
private ChannelTypeRegistry channelTypeRegistry;
9294

@@ -396,7 +398,12 @@ private void updateRuntime(@Nullable RuntimeDTO runtime) {
396398
EcobeeUtils.undefOrDate(runtime.lastStatusModified, timeZoneProvider));
397399
updateChannel(grp + CH_RUNTIME_DATE, EcobeeUtils.undefOrString(runtime.runtimeDate));
398400
updateChannel(grp + CH_RUNTIME_INTERVAL, EcobeeUtils.undefOrDecimal(runtime.runtimeInterval));
399-
updateChannel(grp + CH_ACTUAL_TEMPERATURE, EcobeeUtils.undefOrTemperature(runtime.actualTemperature));
401+
if (runtime.actualTemperature > MIN_VALID_ACTUAL_TEMPERATURE) {
402+
updateChannel(grp + CH_ACTUAL_TEMPERATURE, EcobeeUtils.undefOrTemperature(runtime.actualTemperature));
403+
} else {
404+
logger.debug("Skipping update of actual temperature because temperature {} below min threshold of {}",
405+
runtime.actualTemperature, MIN_VALID_ACTUAL_TEMPERATURE);
406+
}
400407
updateChannel(grp + CH_ACTUAL_HUMIDITY, EcobeeUtils.undefOrQuantity(runtime.actualHumidity, Units.PERCENT));
401408
updateChannel(grp + CH_RAW_TEMPERATURE, EcobeeUtils.undefOrTemperature(runtime.rawTemperature));
402409
updateChannel(grp + CH_SHOW_ICON_MODE, EcobeeUtils.undefOrDecimal(runtime.showIconMode));

0 commit comments

Comments
 (0)