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

Temperature utility deprecated since HA 2022.10, will stop working in 2023.4 #116

Closed
tstabrawa opened this issue Feb 13, 2023 · 5 comments
Closed
Labels
bug Something isn't working.

Comments

@tstabrawa
Copy link

Environment

  • Home Assistant Core release with the issue: 2023.2.3, presumably also all versions >= 2022.10, based on the error message text
  • This custom component release with the issue: Snowtire sensor 1.4.5
  • Last working this custom component release (if known): Unknown
  • Operating environment (Home Assistant/Supervisor/Docker/venv): HA supervised

Describe the bug

The following warning is logged by Home Assistant upon startup:

2023-02-12 23:50:03.979 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that uses temperature utility. This is deprecated since 2022.10 and will stop working in Home Assistant 2023.4, it should be updated to use unit_conversion.TemperatureConverter instead. Please report issue to the custom integration author for snowtire using this method at custom_components/snowtire/binary_sensor.py, line 147: temperature = convert_temperature(

Configuration.yaml

Add your configs here if any.

Steps to Reproduce

Restart Home Assistant. Observe warning in HA logs.

Expected behavior

Ideally, no warnings would be logged.

Debug log

2023-02-12 23:50:03.979 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that uses temperature utility. This is deprecated since 2022.10 and will stop working in Home Assistant 2023.4, it should be updated to use unit_conversion.TemperatureConverter instead. Please report issue to the custom integration author for snowtire using this method at custom_components/snowtire/binary_sensor.py, line 147: temperature = convert_temperature(

Additional context

N/A

@tjorim
Copy link

tjorim commented Oct 25, 2023

@Limych It stopped working for me in 2023.11.0b0:

Logger: homeassistant.config
Source: config.py:923
First occurred: 21:33:54 (1 occurrences)
Last logged: 21:33:54

Platform error: binary_sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config.py", line 923, in async_process_component_config
    platform = p_integration.get_platform(domain)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 836, in get_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 853, 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 "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_components/snowtire/binary_sensor.py", line 39, in <module>
    from homeassistant.util.temperature import convert as convert_temperature
ModuleNotFoundError: No module named 'homeassistant.util.temperature'

@LukaszP2
Copy link

Same to me

@fcastilloec
Copy link
Contributor

fcastilloec commented Nov 1, 2023

Now that 2023.11.0 has been released, this bug will hit everybody.
I see there's a PR #119 that seems to fix this issue, any chance it could be reviewed and merged?

For anybody else that's affected by this issue, I just replaced the two lines of code inside custom_components/snowtire/binary_sensor.py as shown in the PR

@groenmarsmannetje
Copy link

And now it broke…. while there was so much time to prevent this from happening. Time to remove this integration because it is clear that it is no longer supported by the developer.

@KrzysztofHajdamowicz
Copy link
Contributor

And now it broke…. while there was so much time to prevent this from happening. Time to remove this integration because it is clear that it is no longer supported by the developer.

I can fork this integration and accept incoming pull requests as a 'respirator'-level maintainer.

@Limych Limych closed this as completed Nov 6, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants