[ecobee] Fix setHold when using holdHours (#8834)

Signed-off-by: Mark Hilbush <mark@hilbush.com>
This commit is contained in:
Mark Hilbush 2020-10-22 19:38:19 -04:00 committed by GitHub
parent df261980c8
commit e8280b2ef9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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) {