mirror of
https://github.com/pommi/python-itho-wpu.git
synced 2024-11-21 13:52:15 +01:00
feat(itho-wpu): add manufacturer naming
This commit is contained in:
parent
273a22a4c0
commit
d40b0d94ff
17
itho-wpu.py
17
itho-wpu.py
@ -188,13 +188,18 @@ def process_response(action, response, args):
|
||||
|
||||
|
||||
def process_nodeid(response):
|
||||
hardware_info = {
|
||||
0: {
|
||||
"name": "HCCP",
|
||||
"type": {
|
||||
13: "WPU",
|
||||
15: "Autotemp",
|
||||
}
|
||||
}
|
||||
}
|
||||
manufacturergroup = ((int(response[5], 0) << 8) + int(response[6], 0))
|
||||
manufacturer = int(response[7], 0)
|
||||
hardwaretype = int(response[8], 0)
|
||||
if hardwaretype == 0x0d:
|
||||
hardwaretype = "WPU"
|
||||
elif hardwaretype == 0x0f:
|
||||
hardwaretype = "AutoTemp"
|
||||
manufacturer = hardware_info[int(response[7], 0)]["name"]
|
||||
hardwaretype = hardware_info[int(response[7], 0)]["type"][int(response[8], 0)]
|
||||
productversion = int(response[9], 0)
|
||||
listversion = int(response[10], 0)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user