briis / hass-weatherflow

Home Assistant Integration for WeatherFlow Stations
MIT License
69 stars 11 forks source link

2023.3 Update causes AttributeError: 'UnitSystem' object has no attribute 'is_metric' #58

Closed nullpanda closed 1 year ago

nullpanda commented 1 year ago

Updated to 2023.3 and Weatherflow integration can no longer start with the below error in the logs.

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/weatherflow/__init__.py", line 72, in async_setup_entry
    if hass.config.units.is_metric
AttributeError: 'UnitSystem' object has no attribute 'is_metric'
MattMake commented 1 year ago

Guess I should have refreshed the page before posting my exact error as yours. I can second that mine broke as well after 2023.1.0, and the 2023.1.1 patch.

nullpanda commented 1 year ago

I forgot this was a HACS integration, went to HACS and saw I was on 1.0.7 but most recent release was 1.0.14, also noted that there was an explicit update about this error. Updating to 1.0.14 fixed the error and everything is working well again.

MattMake commented 1 year ago

Being a little bit of a newbie in this regard, can you share what you did to upgrade? I see the update attribute showing it needs updating to 1.0.14, tried deleting and re-adding, but it just adds 1.0.7 again.

nullpanda commented 1 year ago

Go to HACS and it should have the update there.

If you installed manually you'll have to remove the files and put the new release in.

On Fri, Mar 3, 2023, 1:49 PM MattMake @.***> wrote:

Being a little bit of a newbie in this regard, can you share what you did to upgrade? I see the update attribute showing it needs updating to 1.0.14, tried deleting and re-adding, but it just adds 1.0.7 again.

— Reply to this email directly, view it on GitHub https://github.com/briis/hass-weatherflow/issues/58#issuecomment-1454109717, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARWUGECBOTZNQVQS76AXHBDW2JKNRANCNFSM6AAAAAAVN3HOZE . You are receiving this because you modified the open/close state.Message ID: @.***>

MattMake commented 1 year ago

Got it, thanks. I was looking under Integrations -> HACS, not directly the menu HACS. Thanks for the tip!