]> git.basschouten.com Git - openhab-addons.git/blob
a8b1a53a28c2ecc02f1c4b9e9982bdc4478f0c94
[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.revolt;
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 Definition of a Revolt Energy Meter.
23  *
24  * @author Volker Bier - Initial contribution
25  */
26 public class RevoltSensorDefinition extends SensorDefinition<RevoltReading> {
27     public RevoltSensorDefinition() {
28         super(JeeLinkBindingConstants.REVOLT_SENSOR_THING_TYPE, "Revolt Power Monitor", "r");
29     }
30
31     @Override
32     public JeeLinkReadingConverter<RevoltReading> createConverter() {
33         return new RevoltReadingConverter();
34     }
35
36     @Override
37     public Class<RevoltReading> getReadingClass() {
38         return RevoltReading.class;
39     }
40
41     @Override
42     public JeeLinkSensorHandler<RevoltReading> createHandler(Thing thing) {
43         return new RevoltSensorHandler(thing, type);
44     }
45 }