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.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.91.
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
28 // @SerializedName("auth")
31 @SerializedName("batteryConfigured")
32 private boolean batteryConfigured;
34 @SerializedName("batteryPower")
35 private double batteryPower;
37 @SerializedName("batterySoC")
38 private int batterySoC;
40 @SerializedName("gridConfigured")
41 private boolean gridConfigured;
43 @SerializedName("gridPower")
44 private double gridPower;
46 @SerializedName("homePower")
47 private double homePower;
49 @SerializedName("loadpoints")
50 private Loadpoint[] loadpoints;
52 @SerializedName("prioritySoC")
53 private double batteryPrioritySoC;
55 @SerializedName("pvConfigured")
56 private boolean pvConfigured;
58 @SerializedName("pvPower")
59 private double pvPower;
61 @SerializedName("siteTitle")
62 private String siteTitle;
65 * @return whether battery is configured
67 public boolean getBatteryConfigured() {
68 return batteryConfigured;
72 * @return battery's power
74 public double getBatteryPower() {
79 * @return battery's priority state of charge
81 public double getBatteryPrioritySoC() {
82 return batteryPrioritySoC;
86 * @return battery's state of charge
88 public int getBatterySoC() {
93 * @return whether grid is configured
95 public boolean getGridConfigured() {
96 return gridConfigured;
100 * @return grid's power
102 public double getGridPower() {
107 * @return home's power
109 public double getHomePower() {
114 * @return all configured loadpoints
116 public Loadpoint[] getLoadpoints() {
121 * @return whether pv is configured
123 public boolean getPvConfigured() {
130 public double getPvPower() {
135 * @return site's title/name
137 public String getSiteTitle() {