home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.43k stars 30.31k forks source link

Kaiterra Integration no longer working - ValueError: URL should be absolute #91234

Closed Sleinous closed 1 month ago

Sleinous commented 1 year ago

The problem

The Kaiterra integration no longer works since atleast a month (broke during an HA update) Logs found below point to the following : ValueError: URL should be absolute

What version of Home Assistant Core has the issue?

core-2023.4.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

kaiterra

Link to integration documentation on our website

https://www.home-assistant.io/integrations/kaiterra/

Diagnostics information

Logger: homeassistant.setup Source: components/kaiterra/api_data.py:57 First occurred: 9 April 2023 at 09:33:22 (1 occurrences) Last logged: 9 April 2023 at 09:33:22

Error during setup of component kaiterra Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 256, in _async_setup_component result = await task File "/usr/src/homeassistant/homeassistant/components/kaiterra/init.py", line 67, in async_setup await api.async_update() File "/usr/src/homeassistant/homeassistant/components/kaiterra/api_data.py", line 57, in async_update data = await self._api.get_latest_sensor_readings(self._devices) File "/usr/local/lib/python3.10/site-packages/kaiterra_async_client/client.py", line 144, in get_latest_sensor_readings r = await self._do_request( File "/usr/local/lib/python3.10/site-packages/kaiterra_async_client/client.py", line 199, in _do_request async with self._session.post(url, params=params, headers=headers, json=json, raise_for_status=True) as r: File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1141, in aenter self._resp = await self._coro File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 628, in _request if url.origin() != parsed_url.origin(): File "/usr/local/lib/python3.10/site-packages/yarl/_url.py", line 389, in origin raise ValueError("URL should be absolute") ValueError: URL should be absolute

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.setup
Source: components/kaiterra/api_data.py:57
First occurred: 9 April 2023 at 09:33:22 (1 occurrences)
Last logged: 9 April 2023 at 09:33:22

Error during setup of component kaiterra
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 256, in _async_setup_component
    result = await task
  File "/usr/src/homeassistant/homeassistant/components/kaiterra/__init__.py", line 67, in async_setup
    await api.async_update()
  File "/usr/src/homeassistant/homeassistant/components/kaiterra/api_data.py", line 57, in async_update
    data = await self._api.get_latest_sensor_readings(self._devices)
  File "/usr/local/lib/python3.10/site-packages/kaiterra_async_client/client.py", line 144, in get_latest_sensor_readings
    r = await self._do_request(
  File "/usr/local/lib/python3.10/site-packages/kaiterra_async_client/client.py", line 199, in _do_request
    async with self._session.post(url, params=params, headers=headers, json=json, raise_for_status=True) as r:
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 628, in _request
    if url.origin() != parsed_url.origin():
  File "/usr/local/lib/python3.10/site-packages/yarl/_url.py", line 389, in origin
    raise ValueError("URL should be absolute")
ValueError: URL should be absolute

Additional information

Error has crept up since a month or so ; all HA instances in the family using kaiterra integration are experiencing this issue

Sleinous commented 5 months ago

Still not resolved.

Envoyé à partir de Outlook pour Androidhttps://aka.ms/AAb9ysg


From: issue-triage-workflows[bot] @.> Sent: Wednesday, May 1, 2024 1:08:10 AM To: home-assistant/core @.> Cc: Sleinous @.>; Mention @.> Subject: Re: [home-assistant/core] Kaiterra Integration no longer working - ValueError: URL should be absolute (Issue #91234)

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/91234#issuecomment-2087683412, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIAUWR7SQGPAO2GIT7AZ553ZAAP5VAVCNFSM6AAAAAAW2NIZN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBXGY4DGNBRGI. You are receiving this because you were mentioned.Message ID: @.***>

justperry commented 4 months ago

Looks like the version is required in the manifest for custom_components to work. Please try with this: kaiterra.tar.gz

Wow, You sir, are the man. Works like a charm now, but, I only see Temp and Humidity and air quality, no CO2-TVOC-PM2.5-PM10 (Yet) They are visible in States though.

Screenshot 2024-05-26 at 20 41 57

Still not resolved. Works here.

justperry commented 4 months ago

For what it is worth, I was able to pull out the 2 following attributes using the following code in the sensor.yaml

- platform: template
    sensor:
      sensedge_co2:
        value_template: "{{ state_attr('air_quality.laseregg_air_quality', 'carbon_dioxide') }}"
        device_class: carbon_dioxide
        unit_of_measurement: ppm
  - platform: template
    sensor:
      sensedge_tvoc:
        value_template: "{{ state_attr('air_quality.laseregg_air_quality', 'volatile_organic_compounds') }}"
        device_class: volatile_organic_compounds
        unit_of_measurement: ppb

image

Tried this, not working, the code you provide is non standard code. If I insert this the way you give nothing is working, Kaiterra won't even start. And, yes, I inserted the provided code above.

Provide the whole File please, it would be much appreciated.

issue-triage-workflows[bot] commented 1 month ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.