]> git.basschouten.com Git - openhab-addons.git/blob
d76349e57c936816a2f2eeb5e562d8766a9a02e4
[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.enocean.internal.eep.A5_02;
14
15 import org.openhab.binding.enocean.internal.messages.ERP1Message;
16
17 /**
18  *
19  * @author Daniel Weber - Initial contribution
20  */
21 public class A5_02_20 extends A5_02 {
22
23     public A5_02_20(ERP1Message packet) {
24         super(packet);
25     }
26
27     @Override
28     protected double getScaledMin() {
29         return -10;
30     }
31
32     @Override
33     protected double getScaledMax() {
34         return 41.2;
35     }
36
37     @Override
38     protected double getUnscaledMin() {
39         return 1023;
40     }
41
42     @Override
43     protected double getUnscaledMax() {
44         return 0;
45     }
46
47     @Override
48     protected int getUnscaledTemperatureValue() {
49         return getDB_1Value() + ((getDB_2Value() & 0b11) << 8);
50     }
51 }