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