]> git.basschouten.com Git - openhab-addons.git/blob
fcfe7e981ace3ecba94470d7576046e92586fa52
[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_04;
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_04_03 extends A5_04 {
24
25     public A5_04_03(ERP1Message packet) {
26         super(packet);
27     }
28
29     @Override
30     protected double getUnscaledTemperatureMax() {
31         return 1023;
32     }
33
34     @Override
35     protected double getScaledTemperatureMin() {
36         return -20;
37     }
38
39     @Override
40     protected double getScaledTemperatureMax() {
41         return 60;
42     }
43
44     @Override
45     protected int getUnscaledTemperatureValue() {
46         return getDB1Value() + ((getDB2Value() & 0b11) << 8);
47     }
48
49     @Override
50     protected double getUnscaledHumidityMax() {
51         return 255;
52     }
53
54     @Override
55     protected int getUnscaledHumidityValue() {
56         return getDB3Value();
57     }
58 }