]> git.basschouten.com Git - openhab-addons.git/blob
9e9a5a158a9465a4fa28714c5afa6c3f0d21083f
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 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.generic.internal.handler;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.openhab.core.library.types.OnOffType;
18
19 /**
20  * The {@link GenericMQTTThingHandler} manages Things that are responsible for MQTT components.
21  * This class contains the necessary configuration for such a Thing handler.
22  *
23  * @author Jochen Klein - Initial contribution
24  */
25 @NonNullByDefault
26 public class GenericThingConfiguration {
27     /**
28      * topic for the availability channel
29      */
30     public @Nullable String availabilityTopic;
31
32     /**
33      * payload for the availability topic when the device is available.
34      */
35     public String payloadAvailable = OnOffType.ON.toString();
36
37     /**
38      * payload for the availability topic when the device is *not* available.
39      */
40     public String payloadNotAvailable = OnOffType.OFF.toString();
41
42     /**
43      * transformation pattern for the availability payload
44      */
45     public @Nullable String transformationPattern;
46 }