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.deconz.internal.dto;
15 import java.util.Arrays;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
21 * The {@link SensorState} is send by the websocket connection as well as the Rest API.
22 * It is part of a {@link SensorMessage}.
24 * This should be in sync with the supported sensors from
25 * https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Supported-Devices.
27 * @author David Graeff - Initial contribution
30 public class SensorState {
31 public @Nullable String airquality;
32 public @Nullable Integer airqualityppb;
33 public @Nullable Boolean alarm;
34 public @Nullable Integer battery;
35 public @Nullable Integer buttonevent;
36 public @Nullable Boolean carbonmonoxide;
37 public @Nullable Double consumption;
38 public @Nullable Double consumption2;
39 public @Nullable Double current;
40 public @Nullable Boolean dark;
41 public @Nullable Boolean daylight;
42 public @Nullable Boolean fire;
43 public @Nullable Integer gesture;
44 public @Nullable Double humidity;
45 public @Nullable String lastupdated;
46 public @Nullable Integer lightlevel;
47 public @Nullable Boolean lowbattery;
48 public @Nullable Integer lux;
49 public @Nullable Integer moisture;
50 public @Nullable Boolean on;
51 public @Nullable Boolean open;
52 public Integer @Nullable [] orientation;
53 public @Nullable Double power;
54 public @Nullable Boolean presence;
55 public @Nullable Integer pressure;
56 public @Nullable Integer status;
57 public @Nullable Boolean tampered;
58 public @Nullable Double temperature;
59 public @Nullable Integer tiltangle;
60 public @Nullable Integer valve;
61 public @Nullable Boolean vibration;
62 public @Nullable Integer vibrationstrength;
63 public @Nullable Double voltage;
64 public @Nullable Boolean water;
65 public @Nullable String windowopen;
66 public double @Nullable [] xy;
69 public String toString() {
70 return "SensorState{" + "airquality='" + airquality + "'" + ", airqualityppb=" + airqualityppb + ", alarm="
71 + alarm + ", battery=" + battery + ", buttonevent=" + buttonevent + ", carbonmonoxide=" + carbonmonoxide
72 + ", consumption=" + consumption + ", consumption2=" + consumption2 + ", current=" + current + ", dark="
73 + dark + ", daylight=" + daylight + ", fire=" + fire + ", gesture=" + gesture + ", humidity=" + humidity
74 + ", lastupdated='" + lastupdated + "'" + ", lightlevel=" + lightlevel + ", lowbattery=" + lowbattery
75 + ", lux=" + lux + ", moisture=" + moisture + ", on=" + on + ", open=" + open + ", orientation="
76 + Arrays.toString(orientation) + ", power=" + power + ", presence=" + presence + ", pressure="
77 + pressure + ", status=" + status + ", tampered=" + tampered + ", temperature=" + temperature
78 + ", tiltangle=" + tiltangle + ", valve=" + valve + ", vibration=" + vibration + ", vibrationstrength="
79 + vibrationstrength + ", voltage=" + voltage + ", water=" + water + ", windowopen='" + windowopen + "'"
80 + ", xy=" + Arrays.toString(xy) + "}";