Skip to content

One missing device breaks the whole integration #1086

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

Closed
2 tasks done
mikelward opened this issue Nov 20, 2024 · 2 comments
Closed
2 tasks done

One missing device breaks the whole integration #1086

mikelward opened this issue Nov 20, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@mikelward
Copy link

Describe the bug

I had to delete my electric car from my Octopus account to fix a password issue.

This seems to have caused the whole integration to fail to start up. I'm missing unrelated sensors e.g. off peak and current tariff.

Reproduction steps

Delete a smart device from Octopus account

Expected behaviour

The integration marks the device as missing and otherwise works.

Tariff Code

0

Integration Version

13.1.2

Home Assistant Version

2024.11.2

Fresh Install?

After upgrading

Home Assistant Logs

Logger: homeassistant.config_entries
Source: config_entries.py:635
First occurred: 19 November 2024 at 16:32:03 (2 occurrences)
Last logged: 09:07:49

Error setting up entry CENSORED for octopus_energy
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/octopus_energy/__init__.py", line 143, in async_setup_entry
    await async_setup_dependencies(hass, config)
  File "/config/custom_components/octopus_energy/__init__.py", line 399, in async_setup_dependencies
    await async_save_cached_intelligent_device(hass, account_id, intelligent_device)
  File "/config/custom_components/octopus_energy/storage/intelligent_device.py", line 29, in async_save_cached_intelligent_device
    await store.async_save(intelligent_device.to_dict(omit_id=False))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'to_dict'

Confirmation

  • I confirm that I cannot find my solution within the documentation
  • I confirm that I cannot find my solution within the FAQ
@mikelward mikelward added the bug Something isn't working label Nov 20, 2024
@mikelward
Copy link
Author

Fixed by 7e7290a?

@BottlecapDave
Copy link
Owner

Hello and sorry you're having issues. The reported error should be fixed as part of v13.1.3. Please upgrade to that and let me know if you're still having issues.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants