From dbde5851d2547bdf9d169cf7eceada7be0c0796d Mon Sep 17 00:00:00 2001 From: Will Freeman <6641284+TheRealWaldo@users.noreply.github.com> Date: Thu, 2 Nov 2023 17:45:00 -0600 Subject: [PATCH] fix: error in hass logs Temperature conversion functions were moved. This fixes the module import. fixes: #215 --- custom_components/optimal_humidity/sensor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/custom_components/optimal_humidity/sensor.py b/custom_components/optimal_humidity/sensor.py index eba43d0..5fb2411 100644 --- a/custom_components/optimal_humidity/sensor.py +++ b/custom_components/optimal_humidity/sensor.py @@ -30,6 +30,8 @@ from homeassistant import util +from homeassistant.util.temperature import fahrenheit_to_celsius + from homeassistant.util.unit_system import METRIC_SYSTEM from homeassistant.components.sensor import ( @@ -316,7 +318,7 @@ def _update_temp_sensor(state): return None if unit == TEMP_FAHRENHEIT: - return util.temperature.fahrenheit_to_celsius(temp) + return fahrenheit_to_celsius(temp) if unit == TEMP_CELSIUS: return temp _LOGGER.warning(