Skip to content

Commit ddffb8e

Browse files
committed
Add returns with typing
1 parent db0ca32 commit ddffb8e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

plugwise/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@
5252
class SmileData(SmileHelper):
5353
"""The Plugwise Smile main class."""
5454

55-
def update_for_cooling(self, device: DeviceData) -> None:
55+
def update_for_cooling(self, device: DeviceData) -> DeviceData:
5656
"""Helper-function for adding/updating various cooling-related values."""
5757
# Add setpoint_low and setpoint_high when cooling is enabled
5858
if device["dev_class"] not in ZONE_THERMOSTATS:
59-
return
59+
return device
6060

6161
# For heating + cooling, replace setpoint with setpoint_high/_low
6262
if self._cooling_present:
@@ -85,6 +85,8 @@ def update_for_cooling(self, device: DeviceData) -> None:
8585
sensors["setpoint_low"] = temp_dict["setpoint_low"]
8686
sensors["setpoint_high"] = temp_dict["setpoint_high"]
8787

88+
return device
89+
8890
def _all_device_data(self) -> None:
8991
"""Helper-function for get_all_devices().
9092
@@ -237,7 +239,7 @@ def _device_data_climate(
237239

238240
def _check_availability(
239241
self, details: ApplianceData, device_data: DeviceData
240-
) -> None:
242+
) -> DeviceData:
241243
"""Helper-function for _get_device_data().
242244
243245
Provide availability status for the wired-commected devices.
@@ -258,6 +260,8 @@ def _check_availability(
258260
if "P1 does not seem to be connected to a smart meter" in msg:
259261
device_data["available"] = False
260262

263+
return device_data
264+
261265
def _get_device_data(self, dev_id: str) -> DeviceData:
262266
"""Helper-function for _all_device_data() and async_update().
263267

0 commit comments

Comments
 (0)