Skip to content

Commit 7446832

Browse files
committed
Ruffed
1 parent 98815bc commit 7446832

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

plugwise/helper.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"""
55
from __future__ import annotations
66

7-
87
import asyncio
98
import datetime as dt
109
from typing import cast
@@ -165,7 +164,10 @@ def power_data_local_format(
165164

166165

167166
def power_data_energy_diff(
168-
measurement: str, net_string: SensorType, f_val: float | int, direct_data: DeviceData
167+
measurement: str,
168+
net_string: SensorType,
169+
f_val: float | int,
170+
direct_data: DeviceData,
169171
) -> DeviceData:
170172
"""Calculate differential energy."""
171173
if (
@@ -908,7 +910,9 @@ def _appliance_measurements(
908910
i_locator = f'.//logs/interval_log[type="{measurement}"]/period/measurement'
909911
if (appl_i_loc := appliance.find(i_locator)) is not None:
910912
name = cast(SensorType, f"{measurement}_interval")
911-
data["sensors"][name] = format_measure(appl_i_loc.text, ENERGY_WATT_HOUR)
913+
data["sensors"][name] = format_measure(
914+
appl_i_loc.text, ENERGY_WATT_HOUR
915+
)
912916

913917
def _wireless_availablity(self, appliance: etree, data: DeviceData) -> None:
914918
"""Helper-function for _get_appliance_data().
@@ -1010,7 +1014,7 @@ def _cleanup_data(self, data: DeviceData) -> None:
10101014
if "cooling_state" in data["binary_sensors"]:
10111015
data["binary_sensors"].pop("cooling_state")
10121016
if "cooling_ena_switch" in data["switches"]:
1013-
data["switches"].pop("cooling_ena_switch")
1017+
data["switches"].pop("cooling_ena_switch")
10141018
if not self._elga and "cooling_enabled" in data:
10151019
data.pop("cooling_enabled") # pragma: no cover
10161020

0 commit comments

Comments
 (0)