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.lacrosse;
15 import org.openhab.binding.jeelink.internal.Reading;
18 * Reading of a LaCrosse Temperature Sensor.
20 * @author Volker Bier - Initial contribution
22 public class LaCrosseTemperatureReading implements Reading {
23 private String sensorId;
24 private int sensorType;
27 private Integer humidity;
28 private boolean batteryNew;
29 private boolean batteryLow;
31 public LaCrosseTemperatureReading(int sensorId, int sensorType, int channel, Float temp, Integer humidity,
32 boolean batteryNew, boolean batteryLow) {
33 this(String.valueOf(sensorId), sensorType, channel, temp, humidity, batteryNew, batteryLow);
36 public LaCrosseTemperatureReading(String sensorId, int sensorType, int channel, Float temp, Integer humidity,
37 boolean batteryNew, boolean batteryLow) {
38 this.sensorId = sensorId;
39 this.sensorType = sensorType;
40 this.channel = channel;
42 this.humidity = humidity;
43 this.batteryNew = batteryNew;
44 this.batteryLow = batteryLow;
48 public String getSensorId() {
52 public int getSensorType() {
56 public Float getTemperature() {
60 public Integer getHumidity() {
64 public boolean isBatteryLow() {
69 public String toString() {
70 return "sensorId=" + sensorId + ": channel=" + channel + ", temp=" + temp + ", hum=" + humidity + ", batLow="
71 + batteryLow + ", batNew=" + batteryNew;
74 public boolean isBatteryNew() {
78 public int getChannel() {