2 * Copyright (c) 2010-2022 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.unifi.internal;
15 import org.openhab.binding.unifi.internal.handler.UniFiClientThingHandler;
18 * The {@link UniFiClientThingConfig} encapsulates all the configuration options for an instance of the
19 * {@link UniFiClientThingHandler}.
21 * @author Matthew Bowman - Initial contribution
23 public class UniFiClientThingConfig {
25 private String cid = "";
27 private String site = "";
29 private int considerHome = 180;
31 public String getClientID() {
35 public String getSite() {
39 public int getConsiderHome() {
43 public UniFiClientThingConfig tidy() {
44 cid = cid.trim().toLowerCase();
45 site = site.trim().toLowerCase();
49 public boolean isValid() {
50 return !cid.isBlank();
54 public String toString() {
55 return String.format("UniFiClientConfig{cid: '%s', site: '%s', considerHome: %d}", cid, site, considerHome);