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.sinope.internal.core.appdata;
16 * The Class SinopeRoomTempData.
18 * @author Pascal Larin - Initial contribution
20 public class SinopeHeatLevelData extends SinopeAppData {
23 * Instantiates a new sinope set point temp data.
25 public SinopeHeatLevelData() {
26 super(new byte[] { 0x00, 0x00, 0x02, 0x20 }, new byte[] { 0 });
32 * @return the room temp
34 public int getHeatLevel() {
35 if (getData() != null) {
36 return getData()[0] & 0xFF;
42 * @see org.openhab.binding.sinope.internal.core.appdata.SinopeAppData#toString()
45 public String toString() {
46 StringBuilder sb = new StringBuilder();
47 sb.append(super.toString());
48 if (getData() != null) {
49 sb.append(String.format("\nHeat Level is %d %%", this.getHeatLevel()));