]> git.basschouten.com Git - openhab-addons.git/blob
c5f3bd72ea34685a574832c7ff34873b5c26da25
[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.bondhome.internal.api;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17
18 import com.google.gson.annotations.Expose;
19 import com.google.gson.annotations.SerializedName;
20
21 /**
22  * This POJO represents the properties of a Bond device
23  *
24  * The incoming JSON looks like this:
25  *
26  * {"max_speed": 3, "trust_state": false, "addr": "10101", "freq": 434300, "bps": 3000, "zero_gap": 30}
27  *
28  * @author Sara Geleskie Damiano - Initial contribution
29  */
30 @NonNullByDefault
31 public class BondDeviceProperties {
32     // The current properties hash
33     @SerializedName("_")
34     @Expose(serialize = false, deserialize = true)
35     public @Nullable String hash;
36     // The maximum speed of a fan
37     @SerializedName("max_speed")
38     @Expose(serialize = true, deserialize = true)
39     public int maxSpeed;
40     // Whether or not to "trust" that the device state remembered by the bond bridge is
41     // correct for toggle switches
42     @SerializedName("trust_state")
43     @Expose(serialize = true, deserialize = true)
44     public boolean trustState;
45     // The device address
46     @Expose(serialize = true, deserialize = true)
47     public String addr = "";
48     // The fan radio frequency
49     @Expose(serialize = true, deserialize = true)
50     public int freq;
51     // Undocumented
52     @Expose(serialize = true, deserialize = true)
53     public int bps;
54     // Undocumented
55     @SerializedName("zero_gap")
56     @Expose(serialize = true, deserialize = true)
57     public int zeroGap;
58 }