Skip to content

Commit a47ae48

Browse files
author
Ernst
committed
Fix test
1 parent d4afc73 commit a47ae48

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

custom_components/ble_monitor/ble_parser/relsib.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def parse_relsib(self, data: bytes, mac: bytes):
4747
device_type = "WH52"
4848
try:
4949
temp = round((int.from_bytes(data[4:6], byteorder='big') / 65535) * 175 - 45, 2)
50-
humi = round((int.from_bytes(data[10:11], byteorder='big') / 65535) * 175 - 45, 2)
50+
humi = round((int.from_bytes(data[10:12], byteorder='big') / 65535) * 175 - 45, 2)
5151
result.update({"temperature": temp, "humidity": humi})
5252
except ValueError:
5353
device_type = None

custom_components/ble_monitor/test/test_relsib.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def test_relsib_WT51(self):
108108

109109
def test_relsib_WH52(self):
110110
"""Test Relsib parser for Relsib WH52."""
111-
data_string = "043b230201030130ddf27cb6fa14051609184dea05161a18b14c0716a2aa30333531c2"
111+
data_string = "043e200201030130ddf27cb6fa14051609184dea05161a18b14c0716a2aa30333531c2"
112112
data = bytes(bytearray.fromhex(data_string))
113113
# pylint: disable=unused-variable
114114
ble_parser = BleParser()

0 commit comments

Comments
 (0)