Default smartenergy multiplier and divisor ()

pull/44260/head
David F. Mulcahey 2020-12-15 10:44:28 -05:00 committed by GitHub
parent a0ce541c0d
commit e601f62416
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
homeassistant/components/zha/core/channels

View File

@ -89,12 +89,12 @@ class Metering(ZigbeeChannel):
@property
def divisor(self) -> int:
"""Return divisor for the value."""
return self.cluster.get("divisor")
return self.cluster.get("divisor") or 1
@property
def multiplier(self) -> int:
"""Return multiplier for the value."""
return self.cluster.get("multiplier")
return self.cluster.get("multiplier") or 1
def async_configure_channel_specific(self) -> Coroutine:
"""Configure channel."""