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.tapocontrol.internal.structures;
15 import static org.openhab.binding.tapocontrol.internal.constants.TapoBindingSettings.MAC_DIVISION_CHAR;
16 import static org.openhab.binding.tapocontrol.internal.helpers.TapoUtils.formatMac;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
21 * Tapo Child Device Information class
23 * @author Gaƫl L'hopital - Initial contribution
26 public class TapoChild {
27 private String fwVer = "";
28 private String hwVer = "";
29 private String type = "";
30 private String model = "";
31 private String mac = "";
32 private String category = "";
33 private String deviceId = "";
34 private boolean overheatStatus = false;
35 private int bindCount = 0;
36 private long onTime = 0;
37 private int slotNumber = 0;
38 private int position = 0;
39 private String nickname = "";
40 private boolean deviceOn = false;
41 private String region = "";
43 /***********************************
47 ************************************/
49 public String getFirmwareVersion() {
53 public String getHardwareVersion() {
57 public Boolean isOff() {
61 public Boolean isOn() {
65 public String getMAC() {
66 return formatMac(mac, MAC_DIVISION_CHAR);
69 public String getModel() {
70 return model.replace(" Series", "");
73 public String getNickname() {
77 public Number getOnTime() {
81 public String getRegion() {
85 public String getRepresentationProperty() {
89 public String getSerial() {
93 public String getType() {
97 public String getFwVer() {
101 public String getHwVer() {
105 public String getMac() {
109 public String getCategory() {
113 public String getDeviceId() {
117 public Boolean getOverheatStatus() {
118 return overheatStatus;
121 public Integer getBindCount() {
125 public Integer getSlotNumber() {
129 public Integer getPosition() {
133 public Boolean getDeviceOn() {
137 public void setDeviceOn(Boolean deviceOn) {
138 this.deviceOn = deviceOn;