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.somfytahoma.internal.handler;
15 import static org.openhab.binding.somfytahoma.internal.SomfyTahomaBindingConstants.TEMPERATURE;
16 import static org.openhab.binding.somfytahoma.internal.SomfyTahomaBindingConstants.TYPE_DECIMAL;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.openhab.core.thing.Thing;
22 * The {@link SomfyTahomaTemperatureSensorHandler} is responsible for handling commands,
23 * which are sent to one of the channels of the temperature sensor thing.
25 * @author Ondrej Pecta - Initial contribution
28 public class SomfyTahomaTemperatureSensorHandler extends SomfyTahomaBaseThingHandler {
30 public SomfyTahomaTemperatureSensorHandler(Thing thing) {
32 stateNames.put(TEMPERATURE, "core:TemperatureState");
34 // override state type because the cloud sends both percent & decimal
35 cacheStateType("core:TemperatureState", TYPE_DECIMAL);