]> git.basschouten.com Git - openhab-addons.git/blob
aa6fb5edd51a3b32943b4d04dabe0be38d67be73
[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.mqtt.homeassistant.internal.config.dto;
14
15 import org.eclipse.jdt.annotation.Nullable;
16
17 import com.google.gson.annotations.SerializedName;
18
19 /**
20  * MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with
21  * availability_topic
22  *
23  * @author Anton Kharuzhy - Initial contribution
24  */
25 public class Availability {
26     @SerializedName("payload_available")
27     protected String payloadAvailable = "online";
28     @SerializedName("payload_not_available")
29     protected String payloadNotAvailable = "offline";
30     @SerializedName("value_template")
31     protected @Nullable String valueTemplate;
32     protected String topic;
33
34     public String getPayloadAvailable() {
35         return payloadAvailable;
36     }
37
38     public String getPayloadNotAvailable() {
39         return payloadNotAvailable;
40     }
41
42     public String getTopic() {
43         return topic;
44     }
45
46     public @Nullable String getValueTemplate() {
47         return valueTemplate;
48     }
49 }