diff --git a/homeassistant/components/zha/core/channels/smartenergy.py b/homeassistant/components/zha/core/channels/smartenergy.py index 58a394e7c80..b6a631308ee 100644 --- a/homeassistant/components/zha/core/channels/smartenergy.py +++ b/homeassistant/components/zha/core/channels/smartenergy.py @@ -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