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.millheat.internal.dto;
15 import java.util.ArrayList;
16 import java.util.List;
18 import com.google.gson.annotations.SerializedName;
21 * This DTO class wraps the set holiday parameter request
24 * @see GetHomesResponse
25 * @author Arne Seime - Initial contribution
27 public class SetHolidayParameterRequest implements AbstractRequest {
29 public static final String PROP_TEMP = "holidayTemp";
30 public static final String PROP_MODE = "isHoliday";
31 public static final String PROP_MODE_ADVANCED = "holidayTempType";
32 public static final String PROP_START = "holidayStartTime";
33 public static final String PROP_END = "holidayEndTime";
35 // {"timeZoneNum":"-01:00","value":11,"homeList":[{"homeId":XXXXXXXXXXXX}],"key":"holidayTemp"}
36 public List<HomeID> homeList = new ArrayList<>();
37 @SerializedName("timeZoneNum")
38 public final String timeZone;
39 public final String key;
40 public final Object value;
43 * Valid parameters: holidayTemp (degrees), holidayStartTime (secs since epoch), holidayEndTime (secs since epoch),
44 * isHoliday (boolean), holidayTempType (0 == advanced vacation mode - room uses it's own away temp, 1 == uses
47 public SetHolidayParameterRequest(Long homeId, String timeZone, String parameter, Object value) {
48 homeList.add(new HomeID(homeId));
49 this.timeZone = timeZone;
55 public String getRequestUrl() {
56 return "holidayChooseHome";
59 private class HomeID {
60 @SuppressWarnings("unused")
63 public HomeID(Long homeId) {