Skip to content

Commit

Permalink
style: format code with black and isort (HandyHat#333)
Browse files Browse the repository at this point in the history
Format code with black and isort

This commit fixes the style issues introduced in 88397f0 according to the output
from black and isort.

Details: https://app.deepsource.com/gh/HandyHat/ha-hildebrandglow-dcc/transform/de7157a1-a0af-447f-b40b-af5b16929fe2/

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
  • Loading branch information
deepsource-autofix[bot] authored Apr 20, 2023
1 parent 88397f0 commit 73a3f95
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions custom_components/hildebrandglow_dcc/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,16 @@ async def daily_data(hass: HomeAssistant, resource) -> float:
_LOGGER.exception("Unexpected exception: %s. Please open an issue", ex)

try:
_LOGGER.debug("Get readings from %s to %s for %s", t_from, t_to, resource.classifier)
_LOGGER.debug(
"Get readings from %s to %s for %s", t_from, t_to, resource.classifier
)
readings = await hass.async_add_executor_job(
resource.get_readings, t_from, t_to, "P1D", "sum", True
)
_LOGGER.debug("Successfully got daily usage for resource id %s", resource.id)
_LOGGER.debug("Readings for %s has %s entries", resource.classifier, len(readings))
_LOGGER.debug(
"Readings for %s has %s entries", resource.classifier, len(readings)
)
v = readings[0][1].value
if len(readings) > 1:
v += readings[1][1].value
Expand Down

0 comments on commit 73a3f95

Please sign in to comment.