mirror of
https://github.com/home-assistant/core.git
synced 2025-08-02 12:15:08 +02:00
Default smartenergy multiplier and divisor (#44257)
This commit is contained in:
committed by
GitHub
parent
a0ce541c0d
commit
e601f62416
@@ -89,12 +89,12 @@ class Metering(ZigbeeChannel):
|
|||||||
@property
|
@property
|
||||||
def divisor(self) -> int:
|
def divisor(self) -> int:
|
||||||
"""Return divisor for the value."""
|
"""Return divisor for the value."""
|
||||||
return self.cluster.get("divisor")
|
return self.cluster.get("divisor") or 1
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def multiplier(self) -> int:
|
def multiplier(self) -> int:
|
||||||
"""Return multiplier for the value."""
|
"""Return multiplier for the value."""
|
||||||
return self.cluster.get("multiplier")
|
return self.cluster.get("multiplier") or 1
|
||||||
|
|
||||||
def async_configure_channel_specific(self) -> Coroutine:
|
def async_configure_channel_specific(self) -> Coroutine:
|
||||||
"""Configure channel."""
|
"""Configure channel."""
|
||||||
|
Reference in New Issue
Block a user