Skip to content

Commit 2e7e17e

Browse files
committed
Use .get()
1 parent 6bf0315 commit 2e7e17e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugwise/helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ def _appliance_measurements(
847847
continue
848848

849849
data[measurement] = format_measure(
850-
t_function.text, attrs[ATTR_UNIT_OF_MEASUREMENT]
850+
t_function.text, attrs.get(ATTR_UNIT_OF_MEASUREMENT)
851851
)
852852

853853
return data

0 commit comments

Comments
 (0)