mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Fix ZHA Metering channel formatting method (#36697)
Since zigpy change to support bitmap classes, formatting string was incorrectly generated for the newly joined devices with SmartEnergy metering clusters.
This commit is contained in:
parent
419a92db43
commit
8e44d797a3
@ -128,7 +128,7 @@ class Metering(ZigbeeChannel):
|
||||
"demand_formatting", 0xF9
|
||||
) # 1 digit to the right, 15 digits to the left
|
||||
|
||||
r_digits = fmting & 0x07 # digits to the right of decimal point
|
||||
r_digits = int(fmting & 0x07) # digits to the right of decimal point
|
||||
l_digits = (fmting >> 3) & 0x0F # digits to the left of decimal point
|
||||
if l_digits == 0:
|
||||
l_digits = 15
|
||||
|
Loading…
x
Reference in New Issue
Block a user