Skip to content

Commit

Permalink
0x0702/0x0000 must not be used for HC/HP, it is only for Base
Browse files Browse the repository at this point in the history
  • Loading branch information
pipiche38 committed Jan 12, 2025
1 parent bef0b16 commit 9b29278
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions DevicesModules/custom_zlinky.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 9b29278

Please sign in to comment.