From 9b2927858c6adbcdf37db16d54874d822f76011f Mon Sep 17 00:00:00 2001 From: Patrick Pichon Date: Sun, 12 Jan 2025 18:27:40 +0100 Subject: [PATCH] 0x0702/0x0000 must not be used for HC/HP, it is only for Base --- DevicesModules/custom_zlinky.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/DevicesModules/custom_zlinky.py b/DevicesModules/custom_zlinky.py index 9c12bf593..ffa237036 100644 --- a/DevicesModules/custom_zlinky.py +++ b/DevicesModules/custom_zlinky.py @@ -88,8 +88,16 @@ def update_color(nwkid, previous_color, new_color): def get_new_color(attribut, op_tarifiare): """Determine the new color based on the attribute and tariff type.""" color_map = { - "HC..": {"0000": "HP..", "0100": "HC..", "0102": "HP.."}, - "TEMPO": {"0100": "BHC", "0102": "BHP", "0104": "WHC", "0106": "WHP", "0108": "RHC", "010a": "RHP"} + "HC..": { + "0100": "HC..", + "0102": "HP.."}, + "TEMPO": { + "0100": "BHC", + "0102": "BHP", + "0104": "WHC", + "0106": "WHP", + "0108": "RHC", + "010a": "RHP"} } return color_map.get(op_tarifiare, {}).get(attribut)