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.pca301;
15 import org.openhab.binding.jeelink.internal.Reading;
18 * Reading of a PCA301 sensor.
20 * @author Volker Bier - Initial contribution
22 public class Pca301Reading implements Reading {
23 private final String sensorId;
24 private final int channel;
25 private final boolean on;
26 private final float current;
27 private final long total;
29 public Pca301Reading(String sensorId, int channel, boolean deviceOn, float consumptionCurrent,
30 long consumptionTotal) {
31 this.sensorId = sensorId;
32 this.channel = channel;
34 current = consumptionCurrent;
35 total = consumptionTotal;
39 public String getSensorId() {
43 public int getChannel() {
47 public boolean isOn() {
51 public float getCurrent() {
55 public long getTotal() {