We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f52bbb5 commit 1d4ffb8Copy full SHA for 1d4ffb8
plugwise/util.py
@@ -195,10 +195,10 @@ def power_data_local_format(
195
# Special formatting of P1_MEASUREMENT POWER_WATT values, do not move to util-format_measure() function!
196
if all(item in key_string for item in ("electricity", "cumulative")):
197
return format_measure(val, ENERGY_KILO_WATT_HOUR)
198
- if (attr_uom := getattr(attrs, ATTR_UNIT_OF_MEASUREMENT)) == POWER_WATT:
+ if (attrs_uom := getattr(attrs, ATTR_UNIT_OF_MEASUREMENT)) == POWER_WATT:
199
return int(round(float(val)))
200
201
- return format_measure(val, attr_uom)
+ return format_measure(val, attrs_uom)
202
203
204
def remove_empty_platform_dicts(data: GwEntityData) -> None:
0 commit comments