Skip to content

Commit

Permalink
fix: Fix bad KVA tarriff fetching - by a fallback (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuyKh authored Dec 6, 2024
1 parent fd6923a commit 86fa34c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/iec/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ async def _get_kva_tariff(self) -> float:
try:
self._kva_tariff = await self.api.get_kva_tariff()
except IECError as e:
_LOGGER.exception("Failed fetching KVA Tariff from IEC API", e)
except Exception as e:
_LOGGER.exception("Failed fetching KVA Tariff", e)
return self._kva_tariff or 0.0

Expand Down

0 comments on commit 86fa34c

Please sign in to comment.