#Kaiterra Integration Broken

1 messages · Page 1 of 1 (latest)

gilded shuttle
#

Following the directions here: https://www.home-assistant.io/integrations/kaiterra

Added the following to my configuration file:

kaiterra:
  api_key: "<redacted>"
  aqi_standard: us
  scan_interval: 30
  devices:
    - device_id: "<redacted>"
      type: sensedge
      name: "Kaiterra Sensedge (Office)"

Relevant error from logs:

Logger: homeassistant.setup
Source: setup.py:425
First occurred: 8:55:35 PM (1 occurrence)
Last logged: 8:55:35 PM
Error during setup of component kaiterra: https:///v1/batch?key=<redacted> - Invalid redirect URL origin

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 874, in _request
    redirect_origin = parsed_redirect_url.origin()
  File "/usr/local/lib/python3.13/site-packages/yarl/_url.py", line 615, in origin
    return self._origin
           ^^^^^^^^^^^^
  File "src/propcache/_helpers_c.pyx", line 48, in propcache._helpers_c.under_cached_property.__get__
  File "/usr/local/lib/python3.13/site-packages/yarl/_url.py", line 628, in _origin
    raise ValueError("URL should be absolute")
ValueError: URL should be absolute

This line in particular is of interest: Error during setup of component kaiterra: https:///v1/batch?key=<redacted> - Invalid redirect URL origin
! The base URL seems to be missing

clear flare
# gilded shuttle Following the directions here: https://www.home-assistant.io/integrations/kaiter...

It looks like this has been an known issue for a while now as noted by THIS and THIS Issue.

However they have both gone stale. You could open a new issue on the core repo to see if there is any renewed interest in fixing it. It looks like there was some attempts to fix it in the past HERE but looks like it fizzled out.

It looks like the integration is unmaintained and its underlaying library is also unmaintained. You may be out of luck.

gilded shuttle
#

@clear flare I’ll happily take a stab at fixing it

clear flare
gilded shuttle
#

I have a mostly working fix in place, I will open an issue and a PR sometime this week when I have more time. Thanks for the context surrounding this issue

gilded shuttle
clear flare
# gilded shuttle

Looks like you have a winner. would be awesome to see a PR. Maybe even drag the integration out of "Legacy" whilst your at it?

gilded shuttle
#

Sounds good! As soon as I can find time again

gilded shuttle
#

Had some time today, did some reading and revamped this integration into the more modern flow based config, no more configuration.yaml legacy nonsense

clear flare
gilded shuttle
#

I've also added tests since it had none

clear flare
gilded shuttle
#

I got to bronze I think

gilded shuttle
#

Correctly groups now too

gilded shuttle
gilded shuttle
#

Just one last check failing and I don't know how to address it manually:

required-labels — Has at least one of the required labels (breaking-change, bugfix, code-quality, dependency, deprecation, new-feature, new-integration)
gilded shuttle
#

They're making me WORK on the weekends 😂

#

I'm splitting my original PR into 5 separate ones now

clear flare
gilded shuttle
#

I didn’t know better 😭

clear flare
gilded shuttle
#

Hey @topaz haven thanks for offering to help. I'll move the convo here for a faster feedback loop if that's okay

topaz haven
#

I also don't mind DMs as this is a support thread

#

but, we should at least be public about what we decide

gilded shuttle
#

Let's move to DMs and I will absolutely document (in the PR) what we decide to move forward with