Skip to content

Commit

Permalink
Line up order of inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
bouwew committed Nov 23, 2023
1 parent fcce463 commit 22d3eaa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugwise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ def _update_gw_devices(self) -> None:
"""
for device_id, device in self.gw_devices.items():
data = self._get_device_data(device_id)
self._add_or_update_notifications(data, device_id, device)
self._add_or_update_notifications(device_id, device, data)
device.update(data)
self._update_for_cooling(device)
remove_empty_platform_dicts(device)

def _add_or_update_notifications(
self, data: DeviceData, device_id: str, device: DeviceData
self, device_id: str, device: DeviceData, data: DeviceData
) -> None:
"""Helper-function adding or updating the Plugwise notifications."""
if (
Expand Down Expand Up @@ -278,7 +278,7 @@ def _get_schedule_states_with_off(
data["select_schedule"] = OFF

def _check_availability(
self, device: DeviceData, data: DeviceData, dev_class: str, message: str
self, device: DeviceData, dev_class: str, data: DeviceData, message: str
) -> None:
"""Helper-function for _get_device_data().
Expand All @@ -304,12 +304,12 @@ def _get_device_data(self, dev_id: str) -> DeviceData:
if not self._smile_legacy:
# Smartmeter
self._check_availability(
device, data, "smartmeter", "P1 does not seem to be connected"
device, "smartmeter", data, "P1 does not seem to be connected"
)
# OpenTherm device
if device["name"] != "OnOff":
self._check_availability(
device, data, "heater_central", "no OpenTherm communication"
device, "heater_central", data, "no OpenTherm communication"
)

# Switching groups data
Expand Down

0 comments on commit 22d3eaa

Please sign in to comment.