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

Fix import error #30

Merged
merged 2 commits into from
Feb 19, 2024
Merged

Fix import error #30

merged 2 commits into from
Feb 19, 2024

Conversation

Ernst79
Copy link
Owner

@Ernst79 Ernst79 commented Jan 27, 2024

Fix import error #29

@Ernst79 Ernst79 requested a review from nelbs January 27, 2024 19:25
@brandhout
Copy link

Hi Ernst, is there a specific version of home assistant or python needed? After applying this commit I'm running into the next error

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/degree_days/__init__.py", line 128, in _async_update_data data = await self.hass.async_add_executor_job( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/degree_days/knmi/__init__.py", line 35, in __init__ self.gas_per_weighted_degree_day = data["consumption_per_weighted_degree_day"] ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ KeyError: 'consumption_per_weighted_degree_day'

@Ernst79
Copy link
Owner Author

Ernst79 commented Feb 19, 2024

Can you try it with the change in commit 93e843d?

@brandhout
Copy link

brandhout commented Feb 19, 2024

Can you try it with the change in commit 93e843d?

The integration does start without errors now so it seems fixed. Awesome, thanks!

@Ernst79 Ernst79 merged commit 674ec2e into main Feb 19, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants