]> git.basschouten.com Git - openhab-addons.git/blob
c8f78dd9a4e8084b8de79ccafaafaea920ae4ed1
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.mybmw.internal.dto.charge;
14
15 import java.util.List;
16
17 /**
18  * The {@link ChargeProfile} Data Transfer Object
19  *
20  * @author Bernd Weymann - Initial contribution
21  * @author Norbert Truchsess - edit & send of charge profile
22  */
23 public class ChargeProfile {
24     public static final Timer INVALID_TIMER = new Timer();
25
26     public ChargingWindow reductionOfChargeCurrent;
27     public String chargingMode;// ": "immediateCharging",
28     public String chargingPreference;// ": "chargingWindow",
29     public String chargingControlType;// ": "weeklyPlanner",
30     public List<Timer> departureTimes;
31     public boolean climatisationOn;// ": false,
32     public ChargingSettings chargingSettings;
33
34     public Timer getTimerId(int id) {
35         if (departureTimes != null) {
36             for (Timer t : departureTimes) {
37                 if (t.id == id) {
38                     return t;
39                 }
40             }
41         }
42         return INVALID_TIMER;
43     }
44 }