]> git.basschouten.com Git - openhab-addons.git/blob
232ef9f2a623351a5fc3b3345a4f13279e9b5577
[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.anthem.internal;
14
15 import static org.openhab.binding.anthem.internal.AnthemBindingConstants.*;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18
19 /**
20  * The {@link AnthemConfiguration} is responsible for storing the Anthem thing configuration.
21  *
22  * @author Mark Hilbush - Initial contribution
23  */
24 @NonNullByDefault
25 public class AnthemConfiguration {
26     public String host = "";
27
28     public int port = DEFAULT_PORT;
29
30     public int reconnectIntervalMinutes = DEFAULT_RECONNECT_INTERVAL_MINUTES;
31
32     public int commandDelayMsec = DEFAULT_COMMAND_DELAY_MSEC;
33
34     public boolean isValid() {
35         return !host.isBlank();
36     }
37
38     @Override
39     public String toString() {
40         return "AnthemConfiguration{ host=" + host + ", port=" + port + ", reconectIntervalMinutes="
41                 + reconnectIntervalMinutes + ", commandDelayMsec=" + commandDelayMsec + " }";
42     }
43 }