]> git.basschouten.com Git - openhab-addons.git/blob
acb7ef86cd2c1d58257c647acd19a45695a4632a
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.somfytahoma.internal.handler;
14
15 import static org.openhab.binding.somfytahoma.internal.SomfyTahomaBindingConstants.TEMPERATURE;
16 import static org.openhab.binding.somfytahoma.internal.SomfyTahomaBindingConstants.TYPE_DECIMAL;
17
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.openhab.core.thing.Thing;
20
21 /**
22  * The {@link SomfyTahomaTemperatureSensorHandler} is responsible for handling commands,
23  * which are sent to one of the channels of the temperature sensor thing.
24  *
25  * @author Ondrej Pecta - Initial contribution
26  */
27 @NonNullByDefault
28 public class SomfyTahomaTemperatureSensorHandler extends SomfyTahomaBaseThingHandler {
29
30     public SomfyTahomaTemperatureSensorHandler(Thing thing) {
31         super(thing);
32         stateNames.put(TEMPERATURE, "core:TemperatureState");
33
34         // override state type because the cloud sends both percent & decimal
35         cacheStateType("core:TemperatureState", TYPE_DECIMAL);
36     }
37 }