]> git.basschouten.com Git - openhab-addons.git/commitdiff
[ecobee] Fix setHold when using holdHours (#8834)
authorMark Hilbush <mark@hilbush.com>
Thu, 22 Oct 2020 23:38:19 +0000 (19:38 -0400)
committerGitHub <noreply@github.com>
Thu, 22 Oct 2020 23:38:19 +0000 (16:38 -0700)
Signed-off-by: Mark Hilbush <mark@hilbush.com>
bundles/org.openhab.binding.ecobee/src/main/java/org/openhab/binding/ecobee/internal/action/EcobeeActions.java

index a9ae8d4ebe9e96b79a596c6aa594b958f2aa7cce..911d53d9e0e2619faa4300a8a698ff6fe93f784e 100644 (file)
@@ -306,9 +306,7 @@ public class EcobeeActions implements ThingActions {
         Map<String, Object> params = new HashMap<String, Object>();
         params.put("coolHoldTemp", coolHoldTemp);
         params.put("heatHoldTemp", heatHoldTemp);
-        params.put("holdType", HoldType.HOLD_HOURS);
-        params.put("holdHours", Integer.valueOf(holdHours.intValue()));
-        return setHold(params, null, null, null, null);
+        return setHold(params, HoldType.HOLD_HOURS.toString(), holdHours, null, null);
     }
 
     public static boolean setHold(ThingActions actions, @Nullable QuantityType<Temperature> coolHoldTemp,
@@ -359,9 +357,7 @@ public class EcobeeActions implements ThingActions {
         }
         Map<String, Object> params = new HashMap<String, Object>();
         params.put("holdClimateRef", holdClimateRef);
-        params.put("holdType", HoldType.HOLD_HOURS);
-        params.put("holdHours", Integer.valueOf(holdHours.intValue()));
-        return setHold(params, null, null, null, null);
+        return setHold(params, HoldType.HOLD_HOURS.toString(), holdHours, null, null);
     }
 
     public static boolean setHold(ThingActions actions, @Nullable String holdClimateRef, @Nullable Number holdHours) {