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

2022.10.x Error deprecation... #202

Closed
DavidFW1960 opened this issue Sep 29, 2022 · 6 comments · Fixed by #205
Closed

2022.10.x Error deprecation... #202

DavidFW1960 opened this issue Sep 29, 2022 · 6 comments · Fixed by #205

Comments

@DavidFW1960
Copy link

2022-09-29 10:05:18.209 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that uses temperature utility. This is deprecated since 2022.10 and will stop working in Home Assistant 2022.4, it should be updated to use unit_conversion.TemperatureConverter instead. Please report issue to the custom integration author for thermal_comfort using this method at custom_components/thermal_comfort/sensor.py, line 604: fahrenheit = util.temperature.celsius_to_fahrenheit(self._temperature)
2022-09-29 10:05:18.211 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that uses temperature utility. This is deprecated since 2022.10 and will stop working in Home Assistant 2022.4, it should be updated to use unit_conversion.TemperatureConverter instead. Please report issue to the custom integration author for thermal_comfort using this method at custom_components/thermal_comfort/sensor.py, line 626: return round(util.temperature.fahrenheit_to_celsius(hi), 2)
2022-09-29 10:05:18.212 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that uses temperature utility. This is deprecated since 2022.10 and will stop working in Home Assistant 2022.4, it should be updated to use unit_conversion.TemperatureConverter instead. Please report issue to the custom integration author for thermal_comfort using this method at custom_components/thermal_comfort/sensor.py, line 696: fahrenheit = util.temperature.celsius_to_fahrenheit(self._temperature)
2022-09-29 10:05:18.213 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that uses temperature utility. This is deprecated since 2022.10 and will stop working in Home Assistant 2022.4, it should be updated to use unit_conversion.TemperatureConverter instead. Please report issue to the custom integration author for thermal_comfort using this method at custom_components/thermal_comfort/sensor.py, line 707: return round(util.temperature.fahrenheit_to_celsius(si), 2)
@rautesamtr
Copy link
Collaborator

Thanks for the report, i guess 2022.4 is a typo and it probably will be removed in 2023.4. We will update to unit_conversion once pytest-homeassistant-custom-component moves to 2022.10.

@jesserockz
Copy link

I get that temperature doesn't even exist already:

2022-10-04 13:49:19.837 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.roof_space_simmerzone fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 515, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 710, in async_device_update
    raise exc
  File "/config/custom_components/thermal_comfort/sensor.py", line 446, in async_update
    value = await getattr(self._device, self._sensor_type)()
  File "/config/custom_components/thermal_comfort/sensor.py", line 261, in wrapped
    setattr(self, f"_{sensor_type}", await func(self, *args, **kwargs))
  File "/config/custom_components/thermal_comfort/sensor.py", line 712, in simmer_zone
    si = await self.simmer_index()
  File "/config/custom_components/thermal_comfort/sensor.py", line 261, in wrapped
    setattr(self, f"_{sensor_type}", await func(self, *args, **kwargs))
  File "/config/custom_components/thermal_comfort/sensor.py", line 696, in simmer_index
    fahrenheit = util.temperature.celsius_to_fahrenheit(self._temperature)
AttributeError: module 'homeassistant.util' has no attribute 'temperature'

@rautesamtr
Copy link
Collaborator

rautesamtr commented Oct 4, 2022

This is more of an import error, importing the temperature module directly from homeassistant.util import temperature still works, from homeassistant import util results in this error.

@haze1986
Copy link

haze1986 commented Oct 6, 2022

How do I update thermal comfort to fix this please?

@riddik14
Copy link

riddik14 commented Oct 8, 2022

Detected integration that uses temperature utility. This is deprecated since 2022.10 and will stop working in Home Assistant 2022.4, it should be updated to use unit_conversion.TemperatureConverter instead. Please report issue to the custom integration author for thermal_comfort using this method at custom_components/thermal_comfort/sensor.py, line 604: fahrenheit = temperature.celsius_to_fahrenheit(self._temperature)

@rautesamtr
Copy link
Collaborator

This will be changed in 2.0 release, please stop re-reporting a deprecation warning. Reporting it once is enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants