2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.evohome.internal.api.models.v2.request;
15 import com.google.gson.annotations.SerializedName;
18 * Request model for the mode
20 * @author Jasper van Zuijlen - Initial contribution
23 public class HeatSetPoint {
26 * Constructs an override reset
29 heatSetpointValue = 0.0;
30 setpointMode = "FollowSchedule";
35 * Constructs a permanent override with the given temperature
37 * @param setPoint The target temperature to set the set point to
39 HeatSetPoint(double setPoint) {
40 // Make sure that the value is rounded toward the nearest 0.5
41 heatSetpointValue = Math.round(setPoint * 2) / 2.0;
42 setpointMode = "PermanentOverride";
46 @SerializedName("heatSetpointValue")
47 private double heatSetpointValue;
49 @SerializedName("setpointMode")
50 private String setpointMode;
52 @SerializedName("timeUntil")
53 private String timeUntil;