Skip to content

Commit 285f121

Browse files
committed
Implement .get() as suggested
1 parent ab97c11 commit 285f121

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugwise/legacy/helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def _get_measurement_data(self, entity_id: str, entity: GwEntityData) -> None:
258258
# Get P1 smartmeter data from MODULES
259259
# !! DON'T CHANGE below two if-lines, will break stuff !!
260260
if self.smile.type == "power":
261-
if entity["dev_class"] == "smartmeter":
261+
if entity.get("dev_class") == "smartmeter":
262262
data.update(self._power_data_from_modules())
263263

264264
entity.update(data)

0 commit comments

Comments
 (0)