Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Division by zero seen in ha-checkwatt #38

Closed
faanskit opened this issue Mar 29, 2024 · 0 comments
Closed

Division by zero seen in ha-checkwatt #38

faanskit opened this issue Mar 29, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@faanskit
Copy link
Owner

Logger: custom_components.checkwatt
Källa: helpers/update_coordinator.py:318
integration: CheckWatt (dokumentation, ärenden)
Inträffade först: 28 mars 2024 kl. 23:11:35 (37 händelser)
Senast loggade: 08:48:31

Unexpected error fetching checkwatt data: float division by zero
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 318, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/checkwatt/init.py", line 388, in _async_update_data
if not await cw_inst.get_fcrd_month_net_revenue():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pycheckwatt/init.py", line 393, in get_fcrd_month_net_revenue
self.dailyaverage = self.revenuemonth / int(dayswithmoney)

ZeroDivisionError: float division by zero

@faanskit faanskit added the bug Something isn't working label Mar 29, 2024
flopp999 added a commit that referenced this issue Apr 1, 2024
faanskit added a commit that referenced this issue Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants