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