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.avmfritz.internal.dto;
15 import java.math.BigDecimal;
17 import javax.xml.bind.annotation.XmlAccessType;
18 import javax.xml.bind.annotation.XmlAccessorType;
19 import javax.xml.bind.annotation.XmlElement;
20 import javax.xml.bind.annotation.XmlRootElement;
23 * See {@link DeviceListModel}.
25 * @author Christoph Weitkamp - Initial contribution
27 @XmlAccessorType(XmlAccessType.FIELD)
28 @XmlRootElement(name = "humidity")
29 public class HumidityModel {
31 @XmlElement(name = "rel_humidity")
32 private BigDecimal relativeHumidity;
34 public BigDecimal getRelativeHumidity() {
35 return relativeHumidity != null ? relativeHumidity : BigDecimal.ZERO;
38 public void setRelativeHumidity(BigDecimal relativeHumidity) {
39 this.relativeHumidity = relativeHumidity;
43 public String toString() {
44 return new StringBuilder().append("[rel_humidity=").append(getRelativeHumidity()).append("]").toString();