Skip to content

Commit 5c45be5

Browse files
committed
2.8.1 UUID int to hex conversion fix.
1 parent c48ebe8 commit 5c45be5

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def read(filename, parent=None):
1919
setup(
2020
name="vallox_websocket_api",
2121
packages=["vallox_websocket_api"],
22-
version="2.8.0",
22+
version="2.8.1",
2323
python_requires=">=3.6.0, <4",
2424
description="Vallox WebSocket API",
2525
author="Jevgeni Kiski",

tests/test_vallox_info.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ async def testGetInfo(self):
2121
'A_CYC_APPL_SW_VERSION_9': 512,
2222
'A_CYC_MACHINE_MODEL': 3,
2323
'A_CYC_UUID0': 25432,
24-
'A_CYC_UUID1': 25432,
24+
'A_CYC_UUID1': 3772,
2525
'A_CYC_UUID2': 25432,
26-
'A_CYC_UUID3': 25432,
26+
'A_CYC_UUID3': 0,
2727
'A_CYC_UUID4': 25432,
2828
'A_CYC_UUID5': 25432,
2929
'A_CYC_UUID6': 25432,
@@ -35,6 +35,6 @@ async def testGetInfo(self):
3535

3636
self.assertEquals("Vallox 145 MV", info["model"])
3737
self.assertEquals("2.0.2", info["sw_version"])
38-
self.assertEquals("63586358-6358-6358-6358-635863586358", str(info["uuid"]))
38+
self.assertEquals("63580ebc-6358-0000-6358-635863586358", str(info["uuid"]))
3939

4040
self.client.fetch_metrics.assert_called()

vallox_websocket_api/vallox.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def get_sw_version(data):
8888

8989
def get_uuid(data):
9090
int_values = [data[m] for m in UUID_METRICS]
91-
hex_string = "".join([hex(i)[2:] for i in int_values])
91+
hex_string = "".join("{0:04x}".format(i) for i in int_values)
9292
return UUID(hex_string)
9393

9494

0 commit comments

Comments
 (0)