siku2 / hass-weatherlink

Home Assistant integration for Davis Instruments' WeatherLink and AirLink
MIT License
27 stars 7 forks source link

HA Core Beta 2024.1.0b3 breaks Weatherlink Integration #59

Open xpl01td opened 10 months ago

xpl01td commented 10 months ago

HA Core Beta updates 2024.01.0b1 and above all break the Integration. Functions properly on 2023.12.4 . See logs below:

Logger: homeassistant.setup Source: setup.py:403 First occurred: 05:14:09 (3 occurrences) Last logged: 05:20:12

Unable to prepare setup for platform 'weatherlink.sensor': Platform not found (Exception importing custom_components.weatherlink.sensor).

Logger: homeassistant.loader Source: loader.py:842 First occurred: 05:14:09 (3 occurrences) Last logged: 05:20:12

Unexpected exception importing platform custom_components.weatherlink.sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/loader.py", line 842, in get_platform cache[full_name] = self._import_platform(platform_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 859, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/config/custom_components/weatherlink/sensor.py", line 4, in from .sensor_air_quality import * File "/config/custom_components/weatherlink/sensor_air_quality.py", line 18, in class AirQualitySensor(WeatherLinkSensor, abc=True): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 295, in new return super().new(mcs, name, bases, namespace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 106, in new File "/config/custom_components/weatherlink/sensor_common.py", line 45, in __init_subclass__ sensor_name = kwargs.pop("sensor_name") ^^^^^^^^^^^^^^^^^^^^^^^^^ KeyError: 'sensor_name'

janssjay commented 10 months ago

This is now in Production ...

Logger: homeassistant.loader Source: loader.py:842 First occurred: 1:24:40 PM (1 occurrences) Last logged: 1:24:40 PM

Unexpected exception importing platform custom_components.weatherlink.sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/loader.py", line 842, in get_platform cache[full_name] = self._import_platform(platform_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 859, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/config/custom_components/weatherlink/sensor.py", line 4, in from .sensor_air_quality import * File "/config/custom_components/weatherlink/sensor_air_quality.py", line 18, in class AirQualitySensor(WeatherLinkSensor, abc=True): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 295, in new return super().new(mcs, name, bases, namespace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 106, in new File "/config/custom_components/weatherlink/sensor_common.py", line 45, in __init_subclass__ sensor_name = kwargs.pop("sensor_name") ^^^^^^^^^^^^^^^^^^^^^^^^^ KeyError: 'sensor_name'

xpl01td commented 10 months ago

Here are the logs from today's production release 2024.1.0 :

Logger: homeassistant.loader Source: loader.py:842 First occurred: 15:48:59 (1 occurrences) Last logged: 15:48:59

Unexpected exception importing platform custom_components.weatherlink.sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/loader.py", line 842, in get_platform cache[full_name] = self._import_platform(platform_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 859, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/config/custom_components/weatherlink/sensor.py", line 4, in from .sensor_air_quality import * File "/config/custom_components/weatherlink/sensor_air_quality.py", line 18, in class AirQualitySensor(WeatherLinkSensor, abc=True): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 295, in new return super().new(mcs, name, bases, namespace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 106, in new File "/config/custom_components/weatherlink/sensor_common.py", line 45, in __init_subclass__ sensor_name = kwargs.pop("sensor_name") ^^^^^^^^^^^^^^^^^^^^^^^^^ KeyError: 'sensor_name'

elji-lennart commented 10 months ago

Same problem for me in 2024.1.0. Restore to 2023.12.4 is OK.

stevebaggs commented 10 months ago

Same here too, roll back to 2023.12.4 working OK.

macoscar commented 10 months ago

I have the same problem with 2024.1.0

Logger: homeassistant.loader Source: loader.py:842 First occurred: 11:22:49 (2 occurrences) Last logged: 11:22:50

Unexpected exception importing platform custom_components.weatherlink.sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/loader.py", line 842, in get_platform cache[full_name] = self._import_platform(platform_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 859, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/config/custom_components/weatherlink/sensor.py", line 4, in from .sensor_air_quality import * File "/config/custom_components/weatherlink/sensor_air_quality.py", line 18, in class AirQualitySensor(WeatherLinkSensor, abc=True): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 295, in new return super().new(mcs, name, bases, namespace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 106, in new File "/config/custom_components/weatherlink/sensor_common.py", line 45, in __init_subclass__ sensor_name = kwargs.pop("sensor_name") ^^^^^^^^^^^^^^^^^^^^^^^^^ KeyError: 'sensor_name'

ardyp87 commented 10 months ago

+1 having same issue after 2024.1.0 update

vip-klaus commented 10 months ago

Same here with the weatherlink-integration. Also same problem with the foxess_modbus-integration.

NRutt2005 commented 10 months ago

I am having the issue below now, on 2024.1.0. I don't know if this is the same related issue as everyone else but everything worked fine until I updated to 2024.1.0. @siku2

Logger: homeassistant.components.template.template_entity Source: components/template/template_entity.py:194 Integration: Template (documentation, issues) First occurred: 10:37:56 AM (31 occurrences) Last logged: 10:46:52 AM

TemplateError('UndefinedError: 'None' has no attribute 'conditions'') while processing template 'Template<template=({{ state_attr("sensor.davis_vantage_pro_curr", "data")["conditions"][0]["temp"] }}) renders=28>' for attribute '_attr_native_value' in entity 'sensor.temp' TemplateError('UndefinedError: 'None' has no attribute 'conditions'') while processing template 'Template<template=({{ state_attr("sensor.davis_vantage_pro_curr", "data")["conditions"][0]["hum"] }}) renders=28>' for attribute '_attr_native_value' in entity 'sensor.hum' TemplateError('UndefinedError: 'None' has no attribute 'conditions'') while processing template 'Template<template=({{ state_attr("sensor.davis_vantage_pro_curr", "data")["conditions"][0]["wind_speed_last"] }}) renders=28>' for attribute '_attr_native_value' in entity 'sensor.wind_speed_template' TemplateError('UndefinedError: 'None' has no attribute 'conditions'') while processing template 'Template<template=({{ state_attr("sensor.davis_vantage_pro_curr", "data")["conditions"][0]["wind_dir_last"] }}) renders=28>' for attribute '_attr_native_value' in entity 'sensor.wind_bearing_template' TemplateError('UndefinedError: 'None' has no attribute 'conditions'') while processing template 'Template<template=({{ state_attr("sensor.davis_vantage_pro_curr", "data")["conditions"][0]["dew_point"] }}) renders=28>' for attribute '_attr_native_value' in entity 'sensor.dew_point_template'

UPDATE EDIT Looks like the above Template issue may be an additional issue that I am receiving. Below is the error log I am receiving just like everyone else.

Logger: homeassistant.loader Source: loader.py:842 First occurred: 10:56:02 AM (1 occurrences) Last logged: 10:56:02 AM

Unexpected exception importing platform custom_components.weatherlink.sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/loader.py", line 842, in get_platform cache[full_name] = self._import_platform(platform_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 859, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/config/custom_components/weatherlink/sensor.py", line 4, in from .sensor_air_quality import * File "/config/custom_components/weatherlink/sensor_air_quality.py", line 18, in class AirQualitySensor(WeatherLinkSensor, abc=True): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 295, in new return super().new(mcs, name, bases, namespace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 106, in new File "/config/custom_components/weatherlink/sensor_common.py", line 45, in __init_subclass__ sensor_name = kwargs.pop("sensor_name") ^^^^^^^^^^^^^^^^^^^^^^^^^ KeyError: 'sensor_name'

ornative commented 10 months ago

Same Problem 2024.1 release:

Logger: homeassistant.loader Source: loader.py:842 First occurred: 3:42:31 PM (1 occurrences) Last logged: 3:42:31 PM

Unexpected exception importing platform custom_components.weatherlink.sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/loader.py", line 842, in get_platform cache[full_name] = self._import_platform(platform_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 859, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/config/custom_components/weatherlink/sensor.py", line 4, in from .sensor_air_quality import * File "/config/custom_components/weatherlink/sensor_air_quality.py", line 18, in class AirQualitySensor(WeatherLinkSensor, abc=True): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 295, in new return super().new(mcs, name, bases, namespace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 106, in new File "/config/custom_components/weatherlink/sensor_common.py", line 45, in __init_subclass__ sensor_name = kwargs.pop("sensor_name") ^^^^^^^^^^^^^^^^^^^^^^^^^ KeyError: 'sensor_name'

ppetru commented 10 months ago

I think this is caused by home-assistant/core#107149 and have a fix that seems to work. Preparing a pull request.

ppetru commented 10 months ago

HA 2024.1.1 has been released with the fix.

janssjay commented 10 months ago

Confirmed! HA 2024.1.1 resolved the issue for me.

NRutt2005 commented 10 months ago

Confirmed as well! HA 2024.1.1 resolves this issue for me too.

xpl01td commented 10 months ago

2024.1.1 resolved for me as well.

ornative commented 10 months ago

Confirmed. 2024.1.1 resolved this.

stevebaggs commented 10 months ago

And here, all working in 2024.1.1

GerhardKreuzer commented 5 months ago

Hi, just installed the integration, but get an error after entering the IP of the host. Stopped the running Weatherlink software on my PC, same problems ...

How should I enter the 'Host name', I just know the IP address, need I some port? I am direc on the same network.

With best regards

Gerhard