Skip to content

Commit

Permalink
run pre-commit lint
Browse files Browse the repository at this point in the history
  • Loading branch information
duhow committed Oct 26, 2024
1 parent 88df2b5 commit 8931792
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions custom_components/aigues_barcelona/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Integration for Aigues de Barcelona."""

from __future__ import annotations

from homeassistant.config_entries import ConfigEntry
Expand Down
1 change: 1 addition & 0 deletions custom_components/aigues_barcelona/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Config flow for integration."""

from __future__ import annotations

import logging
Expand Down
5 changes: 4 additions & 1 deletion custom_components/aigues_barcelona/sensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Platform for sensor integration."""

# from __future__ import annotations
import logging
from datetime import datetime
Expand Down Expand Up @@ -212,7 +213,9 @@ async def _async_import_statistics(self, consumptions) -> None:
)
for stat_id in all_ids:
if stat_id["statistic_id"] == self.internal_sensor_id:
if stat_id["sum"] and (last_stored_value is None or stat_id["sum"] > last_stored_value):
if stat_id["sum"] and (
last_stored_value is None or stat_id["sum"] > last_stored_value
):
last_stored_value = stat_id["sum"]

stats = list()
Expand Down

0 comments on commit 8931792

Please sign in to comment.