siku2 / hass-weatherlink

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

WeatherLink Custom Integration - 2023.3.0 #31

Closed NRutt2005 closed 1 year ago

NRutt2005 commented 1 year ago

I updated my Home Assistant to 2023.3.0...I am now having an issue/error in the logs. Anyone else having this issue? Didn't have this issue on 2023.2.5. Any thoughts?

Logger: homeassistant.config_entries Source: custom_components/weatherlink/units.py:213 Integration: WeatherLink (documentation, issues) First occurred: 11:12:07 PM (1 occurrences) Last logged: 11:12:07 PM

Error setting up entry WeatherLink 001D0A714D87 for weatherlink Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/weatherlink/init.py", line 165, in async_setup_entry await setup_coordinator(hass, entry) File "/config/custom_components/weatherlink/init.py", line 156, in setup_coordinator coordinator = await WeatherLinkCoordinator.build( File "/config/custom_components/weatherlink/init.py", line 145, in build await coordinator.initalize(session, entry) File "/config/custom_components/weatherlink/init.py", line 92, in initalize await self.update_config(self.hass, entry) File "/config/custom_components/weatherlink/init.py", line 71, in update_config self.units = get_unit_config(hass, entry) File "/config/custom_components/weatherlink/units.py", line 213, in get_unit_config if hass.config.units.name == CONF_UNIT_SYSTEM_IMPERIAL: AttributeError: 'UnitSystem' object has no attribute 'name'

Patrick-UK commented 1 year ago

Think it might be related to this:

custom_components.weatherlink.weather::Weather is overriding deprecated methods on an instance of WeatherEntity, this is not valid and will be unsupported from Home Assistant 2023.1. Please report it to the custom integration author.

NRutt2005 commented 1 year ago

Yeah, it is either related to that, or the python version change. Hopefully it can get resolved either way. @siku2 any chance you could look into this? The integration was working just fine on 2023.2.5. I've reverted back to 2023.2.5 for the time being.

Marcus4Aspern commented 1 year ago

Same for me, reverted back to 2023.2.5 and it works again

NRutt2005 commented 1 year ago

Sorry I accidentally hit the close issue button. I changed line 213 with the modified code from the pull request Updates units.py for the new api #32 and now I'm receiving this error. Any insight into what I should do now? This is in 2023.3.1. Sure hope I can get this resolved so I can stay on the latest update of Home Assistant. I will say this is also in Home Assistant OS 2023.3.1 with Supervisor 2023.3.0.

This error originated from a custom integration.

Logger: homeassistant.config_entries Source: custom_components/weatherlink/units.py:213 Integration: WeatherLink (documentation, issues) First occurred: 5:49:41 PM (1 occurrences) Last logged: 5:49:41 PM

Error setting up entry WeatherLink 001D0A714D87 for weatherlink Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/weatherlink/init.py", line 165, in async_setup_entry await setup_coordinator(hass, entry) File "/config/custom_components/weatherlink/init.py", line 156, in setup_coordinator coordinator = await WeatherLinkCoordinator.build( File "/config/custom_components/weatherlink/init.py", line 145, in build await coordinator.__initalize(session, entry) File "/config/custom_components/weatherlink/init.py", line 92, in initalize await self.update_config(self.hass, entry) File "/config/custom_components/weatherlink/init.py", line 71, in __update_config self.units = get_unit_config(hass, entry) File "/config/custom_components/weatherlink/units.py", line 213, in get_unit_config if hass.config.units is IMPERIAL_SYSTEM: NameError: name 'IMPERIAL_SYSTEM' is not defined