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 b1d989c commit 03892f0Copy full SHA for 03892f0
1 file changed
plugwise/data.py
@@ -79,11 +79,12 @@ def _update_gw_entities(self) -> None:
79
remove_empty_platform_dicts(entity)
80
81
# Replace select_dhw_mode with dhw_mode when applicable
82
- if "max_dhw_temperature" in entity:
83
- mode = entity.get("select_dhw_mode")
84
- if mode is not None:
85
- entity.pop("select_dhw_mode")
86
- entity["dhw_mode"] = mode
+ if (
+ "max_dhw_temperature" in entity
+ and (mode := entity.get("select_dhw_mode")) is not None
+ ):
+ entity.pop("select_dhw_mode")
87
+ entity["dhw_mode"] = mode
88
89
def _detect_low_batteries(self) -> list[str]:
90
"""Helper-function updating the low-battery binary_sensor status from a Battery-is-low message."""
0 commit comments