Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration stops working after update HA Core 2025.1.0 #397

Closed
BartGysens opened this issue Jan 4, 2025 · 10 comments
Closed

Integration stops working after update HA Core 2025.1.0 #397

BartGysens opened this issue Jan 4, 2025 · 10 comments
Labels
bug Something isn't working

Comments

@BartGysens
Copy link

The problem

Integration no longer works after HA Core 2025.1.0 update.

What version of this integration (ha-nest-protect) has the issue?

0.4.0

What version of Home Assistant Core has the issue?

2025.1.0

Device / Model

4 devices (Nest Protect)

Diagnostics information

No response

Home Assistant log

Logs
2025-01-04 15:48:00.831 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Nest Protect for nest_protect
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/nest_protect/__init__.py", line 126, in async_setup_entry
    await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2278, in async_forward_entry_setups
    await integration.async_get_platforms(platforms)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1185, in async_get_platforms
    import_future.result()
    ~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1185, in async_get_platforms
    import_future.result()
    ~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1185, in async_get_platforms
    import_future.result()
    ~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1173, in async_get_platforms
    platforms.update(self._load_platforms(platform_names))
                     ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1098, in _load_platforms
    platform_name: self._load_platform(platform_name)
                   ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1272, in _load_platform
    cache[full_name] = self._import_platform(platform_name)
                       ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1304, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/nest_protect/sensor.py", line 14, in <module>
    from homeassistant.const import PERCENTAGE, TEMP_CELSIUS
ImportError: cannot import name 'TEMP_CELSIUS' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

Additional information

No response

@BartGysens BartGysens added the bug Something isn't working label Jan 4, 2025
@MAFL74
Copy link

MAFL74 commented Jan 4, 2025

Same problem. Asks for reauthentication and token.

@jazzyisj
Copy link

jazzyisj commented Jan 4, 2025

Mick is going to need your logs, device diagnostics and all that fun stuff. FWIW working here on 2025.1.0 with no issues.

@T0MMY24
Copy link

T0MMY24 commented Jan 5, 2025

Same problem here.

Log message here:

Logger: homeassistant.config_entries
Source: config_entries.py:640
First Occurred: January 4, 2025 at 10:46:50 AM (3 events)
Last logged: 16:56:20

Error setting up entry Nest Protect for nest_protect
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/nest_protect/__init__.py", line 127, in async_setup_entry
    await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2278, in async_forward_entry_setups
    await integration.async_get_platforms(platforms)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1185, in async_get_platforms
    import_future.result()
    ~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1185, in async_get_platforms
    import_future.result()
    ~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1185, in async_get_platforms
    import_future.result()
    ~~~~~~~~~~~~~~~~~~~~^^
  [Previous line repeated 1 more time]
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1173, in async_get_platforms
    platforms.update(self._load_platforms(platform_names))
                     ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1098, in _load_platforms
    platform_name: self._load_platform(platform_name)
                   ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1272, in _load_platform
    cache[full_name] = self._import_platform(platform_name)
                       ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1304, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/nest_protect/sensor.py", line 14, in <module>
    from homeassistant.const import PERCENTAGE, TEMP_CELSIUS
ImportError: cannot import name 'TEMP_CELSIUS' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

@CopyCat73
Copy link

CopyCat73 commented Jan 5, 2025

Same TEMP_CELSIUS error here.. The const is deprecated and now gone. See https://github.com/home-assistant/core/issues/108991 should be a simple fix. did not go from beta to production?

@iMicknl
Copy link
Owner

iMicknl commented Jan 5, 2025

Please update to the latest version. Most likely you are using a fork and not this integration.

Easiest is to remove the ha-nest-protect folder from your custom_component folder and install 0.4.0 manually.

@iMicknl iMicknl closed this as completed Jan 5, 2025
@BartGysens
Copy link
Author

solved!

Thank you iMicknl

@whereizben
Copy link

Hi,
I just did as @iMicknl instructed and have 0.4.0 installed, and still get the same error.
Here's my debug log.
Thanks for the help!

image

2025-01-05 14:14:27.836 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Nest Protect for nest_protect
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/nest_protect/init.py", line 126, in async_setup_entry
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2278, in async_forward_entry_setups
await integration.async_get_platforms(platforms)
File "/usr/src/homeassistant/homeassistant/loader.py", line 1185, in async_get_platforms
import_future.result()
~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1185, in async_get_platforms
import_future.result()
~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1185, in async_get_platforms
import_future.result()
~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1173, in async_get_platforms
platforms.update(self._load_platforms(platform_names))
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1098, in _load_platforms
platform_name: self._load_platform(platform_name)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1272, in _load_platform
cache[full_name] = self._import_platform(platform_name)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1304, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
return func(*args, **kwargs)
File "/usr/local/lib/python3.13/importlib/init.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 1026, in exec_module
File "", line 488, in _call_with_frames_removed
File "/config/custom_components/nest_protect/sensor.py", line 14, in
from homeassistant.const import PERCENTAGE, TEMP_CELSIUS
ImportError: cannot import name 'TEMP_CELSIUS' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

@iMicknl
Copy link
Owner

iMicknl commented Jan 5, 2025

How did you install 0.4.0? This code is not present anymore, so it is impossible to face this error if you installed it correctly..

@T0MMY24
Copy link

T0MMY24 commented Jan 6, 2025

That solved it for me. I removed the old integration from the Home Assistant integrations page. Then I searched for and downloaded 'Nest Protect' in HACS. Then go back to the integrations page and search for 'Nest Protect' and then follow the steps.

@whereizben
Copy link

How did you install 0.4.0? This code is not present anymore, so it is impossible to face this error if you installed it correctly..

I'm not sure what happened with removing the old install and installing 0.4.0 but I just repeated the process and this time it worked. Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants