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.souliss.internal.handler;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.souliss.internal.SoulissBindingConstants;
17 import org.openhab.core.library.types.QuantityType;
18 import org.openhab.core.thing.ChannelUID;
19 import org.openhab.core.thing.Thing;
20 import org.openhab.core.thing.ThingStatus;
21 import org.openhab.core.types.Command;
24 * The {@link SoulissT5nHandler} is responsible for handling commands, which are
25 * sent to one of the channels.
27 * @author Tonino Fazio - Initial contribution
28 * @author Luca Calcaterra - Refactor for OH3
31 public class SoulissT5nHandler extends SoulissGenericHandler {
33 private float fVal = 0xF;
35 public SoulissT5nHandler(Thing thing) {
40 public void initialize() {
43 updateStatus(ThingStatus.UNKNOWN);
46 public void setState(QuantityType<?> state) {
47 this.updateState(SoulissBindingConstants.T5N_VALUE_CHANNEL, state);
51 public void setRawState(byte rawState) {
52 throw new UnsupportedOperationException("Not Implemented, yet.");
55 public void setFloatValue(float valueOf) {
56 super.setLastStatusStored();
57 if (fVal != valueOf) {
58 this.setState(QuantityType.valueOf(Float.toString(valueOf)));
64 public byte getRawState() {
65 throw new UnsupportedOperationException("Not Implemented, yet.");
68 public float getFloatState() {
73 public byte getExpectedRawState(byte bCommand) {
74 // Secure Send is disabled
79 public void handleCommand(ChannelUID channelUID, Command command) {
80 throw new UnsupportedOperationException("Unsupported operation. Read Only");