]> git.basschouten.com Git - openhab-addons.git/blob
a2cc9ed57d7cb54b9034569cb722287896ae5700
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 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.senechome.internal.json;
14
15 import java.io.Serializable;
16 import java.util.Arrays;
17
18 import com.google.gson.annotations.SerializedName;
19
20 /**
21  * Battery related data from section "BMS".
22  *
23  * @author Erwin Guib - Initial Contribution
24  */
25 public class SenecHomeBattery implements Serializable {
26
27     public static final long serialVersionUID = -2850415059107677832L;
28
29     /**
30      * Total charged energy per battery pack (mWh).
31      */
32     public @SerializedName("CHARGED_ENERGY") String[] chargedEnergy;
33
34     /**
35      * Total discharged energy per battery pack (mWh).
36      */
37     public @SerializedName("DISCHARGED_ENERGY") String[] dischargedEnergy;
38
39     /**
40      * Number of load cycles per battery pack.
41      */
42     public @SerializedName("CYCLES") String[] cycles;
43
44     /**
45      * Current per battery pack (A).
46      */
47     public @SerializedName("CURRENT") String[] current;
48
49     /**
50      * Voltage per battery pack (V).
51      */
52     public @SerializedName("VOLTAGE") String[] voltage;
53
54     /**
55      * Maximum cell voltage per battery pack (mV).
56      */
57     public @SerializedName("MAX_CELL_VOLTAGE") String[] maxCellVoltage;
58
59     /**
60      * Minimum cell voltage per battery pack (mV).
61      */
62     public @SerializedName("MIN_CELL_VOLTAGE") String[] minCellVoltage;
63
64     @Override
65     public String toString() {
66         return "SenecHomeBattery{" + "chargedEnergy=" + Arrays.toString(chargedEnergy) + ", dischargedEnergy="
67                 + Arrays.toString(dischargedEnergy) + ", cycles=" + Arrays.toString(cycles) + ", current="
68                 + Arrays.toString(current) + ", voltage=" + Arrays.toString(voltage) + ", maxCellVoltage="
69                 + Arrays.toString(maxCellVoltage) + ", minCellVoltage=" + Arrays.toString(minCellVoltage) + '}';
70     }
71 }