|
4 | 4 | """ |
5 | 5 | from __future__ import annotations |
6 | 6 |
|
7 | | - |
8 | 7 | import asyncio |
9 | 8 | import datetime as dt |
10 | 9 | from typing import cast |
@@ -165,7 +164,10 @@ def power_data_local_format( |
165 | 164 |
|
166 | 165 |
|
167 | 166 | 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, |
169 | 171 | ) -> DeviceData: |
170 | 172 | """Calculate differential energy.""" |
171 | 173 | if ( |
@@ -908,7 +910,9 @@ def _appliance_measurements( |
908 | 910 | i_locator = f'.//logs/interval_log[type="{measurement}"]/period/measurement' |
909 | 911 | if (appl_i_loc := appliance.find(i_locator)) is not None: |
910 | 912 | 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 | + ) |
912 | 916 |
|
913 | 917 | def _wireless_availablity(self, appliance: etree, data: DeviceData) -> None: |
914 | 918 | """Helper-function for _get_appliance_data(). |
@@ -1010,7 +1014,7 @@ def _cleanup_data(self, data: DeviceData) -> None: |
1010 | 1014 | if "cooling_state" in data["binary_sensors"]: |
1011 | 1015 | data["binary_sensors"].pop("cooling_state") |
1012 | 1016 | if "cooling_ena_switch" in data["switches"]: |
1013 | | - data["switches"].pop("cooling_ena_switch") |
| 1017 | + data["switches"].pop("cooling_ena_switch") |
1014 | 1018 | if not self._elga and "cooling_enabled" in data: |
1015 | 1019 | data.pop("cooling_enabled") # pragma: no cover |
1016 | 1020 |
|
|
0 commit comments