Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
adammcdonagh committed Oct 14, 2024
1 parent b1103e4 commit 92ef53d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions custom_components/powervault/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,14 @@ def _fetch_powervault_data(client: PowerVault, unit_id: str) -> PowervaultData:
if data[0][key] is None:
current_index = len(past_hour_data) - 1
while current_index >= 0:

if (
current_value := past_hour_data[current_index][key]
) is not None:
data[0][key] = current_value
_LOGGER.info(
f"Replacing value of {key} to populated_entry from {past_hour_data[current_index]['time']} with value {current_value}"
f"Replacing value of {key} to populated_entry from"
f" {past_hour_data[current_index]['time']} with value"
f" {current_value}"
)
break
current_index -= 1
Expand Down

0 comments on commit 92ef53d

Please sign in to comment.