2 * Copyright (c) 2010-2022 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.somneo.internal.model;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
17 import com.google.gson.annotations.SerializedName;
20 * This class represents the program timer state from the API.
22 * @author Michael Myrcik - Initial contribution
25 public class TimerData {
27 @SerializedName("rlxmn")
28 private int relaxMinutes;
30 @SerializedName("rlxsc")
31 private int relaxSeconds;
33 @SerializedName("dskmn")
34 private int sunsetMinutes;
36 @SerializedName("dsksc")
37 private int sunsetSeconds;
39 public int remainingTimeRelax() {
40 return relaxMinutes * 60 + relaxSeconds;
43 public int remainingTimeSunset() {
44 return sunsetMinutes * 60 + sunsetSeconds;