]> git.basschouten.com Git - openhab-addons.git/blob
35610536e216880829b1208d2d6e093d5f01ab1a
[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.solarwatt.internal.domain.model;
14
15 import static org.openhab.binding.solarwatt.internal.SolarwattBindingConstants.CHANNEL_POWER_AC_OUT;
16 import static org.openhab.binding.solarwatt.internal.SolarwattBindingConstants.CHANNEL_WORK_AC_OUT;
17
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.openhab.binding.solarwatt.internal.domain.dto.DeviceDTO;
20
21 /**
22  * Class to represent the producing parts of the photovoltaic installation.
23  *
24  * This fields have been identified to exist:
25  * com.kiwigrid.devices.pvplant.PVPlant=[
26  * PowerACOutMax,
27  * IdInverterList,
28  * TimePowerOutForecastGranularity,
29  * ForecastDateUpdate,
30  * WorkACOut,
31  * DegreeDirection,
32  * ForecastPowerOut,
33  * WorkAnnualYield,
34  * PowerACOut,
35  * DatePowerOutForecastStart,
36  * PowerLimit,
37  * IdMountingType,
38  * FractionDeratingLimit,
39  * DateInstallation,
40  * ForecastWorkOut,
41  * PowerOutForecastNow,
42  * PriceProfitFeedin,
43  * AddressLocation,
44  * PowerOutForecastValues,
45  * FractionConfigDeratingLimit,
46  * PowerInstalledPeak,
47  * LocationGeographical,
48  * DegreeInclination
49  * ]
50  *
51  * @author Sven Carstens - Initial contribution
52  */
53 @NonNullByDefault
54 public class PVPlant extends Device {
55     public static final String SOLAR_WATT_CLASSNAME = "com.kiwigrid.devices.pvplant.PVPlant";
56
57     public PVPlant(DeviceDTO deviceDTO) {
58         super(deviceDTO);
59     }
60
61     @Override
62     public void update(DeviceDTO deviceDTO) {
63         super.update(deviceDTO);
64
65         this.addWattQuantity(CHANNEL_POWER_AC_OUT, deviceDTO);
66         this.addWattHourQuantity(CHANNEL_WORK_AC_OUT, deviceDTO);
67     }
68
69     @Override
70     protected String getSolarWattLabel() {
71         return "PVPlant";
72     }
73 }