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.evcc.internal.api.dto;
15 import com.google.gson.annotations.SerializedName;
18 * This class represents the result object of the status response (/api/state).
19 * This DTO was written for evcc version 0.106.3
21 * @author Florian Hotze - Initial contribution
24 // Data types from https://github.com/evcc-io/evcc/blob/master/api/api.go
25 // and from https://docs.evcc.io/docs/reference/configuration/messaging/#msg
27 // "auth" is left out because it does not provide any useful information
29 @SerializedName("batteryConfigured")
30 private boolean batteryConfigured;
32 @SerializedName("batteryPower")
33 private float batteryPower;
35 @SerializedName("batterySoC")
36 private float batterySoC;
38 @SerializedName("gridConfigured")
39 private boolean gridConfigured;
41 @SerializedName("gridPower")
42 private float gridPower;
44 @SerializedName("homePower")
45 private float homePower;
47 @SerializedName("loadpoints")
48 private Loadpoint[] loadpoints;
50 @SerializedName("prioritySoC")
51 private float batteryPrioritySoC;
53 @SerializedName("pvConfigured")
54 private boolean pvConfigured;
56 @SerializedName("pvPower")
57 private float pvPower;
59 @SerializedName("siteTitle")
60 private String siteTitle;
63 * @return whether battery is configured
65 public boolean getBatteryConfigured() {
66 return batteryConfigured;
70 * @return battery's power
72 public float getBatteryPower() {
77 * @return battery's priority state of charge
79 public float getBatteryPrioritySoC() {
80 return batteryPrioritySoC;
84 * @return battery's state of charge
86 public float getBatterySoC() {
91 * @return whether grid is configured
93 public boolean getGridConfigured() {
94 return gridConfigured;
98 * @return grid's power
100 public float getGridPower() {
105 * @return home's power
107 public float getHomePower() {
112 * @return all configured loadpoints
114 public Loadpoint[] getLoadpoints() {
119 * @return whether pv is configured
121 public boolean getPvConfigured() {
128 public float getPvPower() {
133 * @return site's title/name
135 public String getSiteTitle() {