2 * Copyright (c) 2010-2023 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.plugwiseha.internal.config;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
18 * The {@link PlugwiseHAThingConfig} encapsulates the configuration options for
19 * an instance of the {@link PlugwiseHAApplianceHandler} and the
20 * {@link PlugwiseHAZoneHandler}
22 * @author Bas van Wetten - Initial contribution
23 * @author Leo Siepel - finish initial contribution
26 public class PlugwiseHAThingConfig {
28 private String id = "";
30 private int lowBatteryPercentage = 15;
34 public String getId() {
38 public int getLowBatteryPercentage() {
39 return this.lowBatteryPercentage;
44 public boolean isValid() {
45 return !id.isBlank() && lowBatteryPercentage > 0 && lowBatteryPercentage < 100;
49 public String toString() {
50 return "PlugwiseHAThingConfig{id = " + id + ", lowBatteryPercentage = " + lowBatteryPercentage + "}";