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

Recent Update Broke Integration in HACS #31

Open
adam-olson opened this issue Jul 18, 2022 · 12 comments
Open

Recent Update Broke Integration in HACS #31

adam-olson opened this issue Jul 18, 2022 · 12 comments

Comments

@adam-olson
Copy link

Version of the custom_component

7baac81

Describe the bug

Opened an issue with HACS on the bug but he said to open one with you as it appears to have been caused by changes in the recent update to files. See github issue, hacs/integration#2796

Debug log


2022-07-18 11:40:25 DEBUG (MainThread) [custom_components.hacs] <Integration dotKrad/hass-fpl> Getting repository information
2022-07-18 11:40:25 DEBUG (MainThread) [custom_components.hacs] <Integration dotKrad/hass-fpl> Running checks against master
2022-07-18 11:40:26 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140668858855536] Error handling message: Unknown error (unknown_error)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
    await func(hass, connection, msg)
  File "/config/custom_components/hacs/websocket/repository.py", line 40, in hacs_repository_info
    await repository.update_repository(ignore_issues=True, force=True)
  File "/config/custom_components/hacs/utils/decorator.py", line 28, in wrapper
    result = await function(*args, **kwargs)
  File "/config/custom_components/hacs/repositories/integration.py", line 110, in update_repository
    if manifest := await self.async_get_integration_manifest():
  File "/config/custom_components/hacs/repositories/integration.py", line 166, in async_get_integration_manifest
    return json_loads(decode_content(response.data.content))
orjson.JSONDecodeError: key must be a string at line 14 column 1: line 14 column 1 (char 260)

@dorgan
Copy link

dorgan commented Jul 21, 2022

Same here looks like a bad merge inside of config/custom_components/fpl/sensor_KWHSensor.py

image

@adam-olson
Copy link
Author

It is not just that file, it is almost all of the .py files, have the corrupted sections in them.

@Lukejb14
Copy link

✅ Resolved.

Update to newest FPL release in HACS to resolve this issue.

@subcritical71
Copy link

subcritical71 commented Aug 4, 2022

I updated my FPL add on to the latest. In doing so I ran into some issues and removed the add on, reinstalled the latest code, then tried to add the integration. I get the login/password prompt but cannot get past it due to an error;

2022-08-05 15:06:37.174 INFO (MainThread) [custom_components.fpl] Logging in
2022-08-05 15:06:42.176 ERROR (MainThread) [custom_components.fpl] Error : <class 'asyncio.exceptions.TimeoutError'>

Is this related to this issue or should I go ahead a make a new issue? I cannot seems to find where I am going wrong.

@subcritical71
Copy link

I should add that when I get this error I do not get my normal email from FPL telling me someone tried to access my account.

@adamoutler
Copy link
Contributor

Still broken for months now.

@dotKrad
Copy link
Owner

dotKrad commented Aug 29, 2022 via email

@adamoutler
Copy link
Contributor

I removed and readded. It came online after 2 hours. I suppose this issue could be closed, but it does need some work. On a side note the devcontainer appears to be broken as well.

@Lukejb14
Copy link

try to remove it and add again, and let me know pls

On Sun, Aug 28, 2022 at 11:52 AM Adam Outler @.***>
wrote:

Still broken for months now.


Reply to this email directly, view it on GitHub
#31 (comment),
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AD6TTASZ6Y5YLOWLFPHAYNDV3ODNTANCNFSM5344BSVA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

This worked, FPL entities online immediately.

Steps that worked for me:
• Remove FPL integration
• Remove FPL from HACS
• Restart
• Install FPL from HACS
• Restart
• Setup FPL integration

@dorgan
Copy link

dorgan commented Aug 29, 2022 via email

@adamoutler
Copy link
Contributor

In the event the data isn't there, when in __init__.py, in the method async_setup_entry, you can raise ConfigEntryNotReady to cause HA to call async_setup_entry again at a later time. This may be what is required.

@adamoutler
Copy link
Contributor

Mine are back offline. It needs to be debounced. Like if the data is empty, don't replace the data source. It needs to use the last known good value.

While I was typing this, the sensors all came back online.

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

6 participants