thermal_comfort icon indicating copy to clipboard operation
thermal_comfort copied to clipboard

2022.10.x Error deprecation...

Open DavidFW1960 opened this issue 2 years ago • 6 comments

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)

DavidFW1960 avatar Sep 29 '22 00:09 DavidFW1960

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.

rautesamtr avatar Sep 29 '22 10:09 rautesamtr

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'

jesserockz avatar Oct 04 '22 00:10 jesserockz

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.

rautesamtr avatar Oct 04 '22 08:10 rautesamtr

How do I update thermal comfort to fix this please?

haze1986 avatar Oct 06 '22 09:10 haze1986

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)

riddik14 avatar Oct 08 '22 21:10 riddik14

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

rautesamtr avatar Oct 09 '22 08:10 rautesamtr