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.jeelink.internal.ec3k;
15 import org.openhab.binding.jeelink.internal.Reading;
18 * Reading of an EC3000 sensor.
20 * @author Volker Bier - Initial contribution
22 public class Ec3kReading implements Reading {
23 private float currentWatt;
24 private float maxWatt;
25 private long consumptionTotal;
26 private long applianceTime;
27 private long sensorTime;
28 private String sensorId;
31 public Ec3kReading(String sensorId, float currentWatt, float maxWatt, long consumptionTotal, long applianceTime,
32 long sensorTime, int resets) {
33 this.currentWatt = currentWatt;
34 this.maxWatt = maxWatt;
35 this.consumptionTotal = consumptionTotal;
36 this.applianceTime = applianceTime;
37 this.sensorTime = sensorTime;
38 this.sensorId = sensorId;
43 public String toString() {
44 return "sensorId=" + sensorId + ": currWatt=" + currentWatt + ", maxWatt=" + maxWatt + ", consumption="
45 + consumptionTotal + ", applianceTime=" + applianceTime + ", sensorTime=" + sensorTime + ", resets="
49 public float getCurrentWatt() {
54 public String getSensorId() {
58 public float getMaxWatt() {
62 public long getConsumptionTotal() {
63 return consumptionTotal;
66 public long getApplianceTime() {
70 public long getSensorTime() {
74 public int getResets() {