]> git.basschouten.com Git - openhab-addons.git/blob
e3a8f00e47b5c9275a049288f6150589ba5a6924
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 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.jeelink.internal.lacrosse;
14
15 import org.openhab.binding.jeelink.internal.JeeLinkBindingConstants;
16 import org.openhab.binding.jeelink.internal.JeeLinkReadingConverter;
17 import org.openhab.binding.jeelink.internal.JeeLinkSensorHandler;
18 import org.openhab.binding.jeelink.internal.SensorDefinition;
19 import org.openhab.core.thing.Thing;
20
21 /**
22  * Sensor Defintion of a LaCrosse Temperature Sensor
23  *
24  * @author Volker Bier - Initial contribution
25  */
26 public class LaCrosseSensorDefinition extends SensorDefinition<LaCrosseTemperatureReading> {
27
28     public LaCrosseSensorDefinition() {
29         super(JeeLinkBindingConstants.LACROSSE_SENSOR_THING_TYPE, "LaCrosse Temperature Sensor", "9");
30     }
31
32     @Override
33     public JeeLinkReadingConverter<LaCrosseTemperatureReading> createConverter() {
34         return new LaCrosseTemperatureReadingConverter();
35     }
36
37     @Override
38     public Class<LaCrosseTemperatureReading> getReadingClass() {
39         return LaCrosseTemperatureReading.class;
40     }
41
42     @Override
43     public JeeLinkSensorHandler<LaCrosseTemperatureReading> createHandler(Thing thing) {
44         return new LaCrosseTemperatureSensorHandler(thing, type);
45     }
46 }