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

could not convert string to float: 'unavailable' #328

Open
woopstar opened this issue Sep 23, 2024 · 0 comments
Open

could not convert string to float: 'unavailable' #328

woopstar opened this issue Sep 23, 2024 · 0 comments

Comments

@woopstar
Copy link

Sometimes, some of the sensors become unavailable. This results in the following error in the log:

2024-09-23 09:09:33.136 ERROR (Recorder) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/config/custom_components/ev_smart_charging/coordinator.py", line 770, in update_sensors_new
    await self.update_sensors(
  File "/config/custom_components/ev_smart_charging/coordinator.py", line 820, in update_sensors
    self.solar_charging.update_grid_usage(float(new_state.state))
                                          ^^^^^^^^^^^^^^^^^^^^^^
ValueError: could not convert string to float: 'unavailable'

There should be a check for this in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant