Skip to content

Commit

Permalink
fix: error in hass logs
Browse files Browse the repository at this point in the history
Temperature conversion functions were moved. This fixes the module import.

fixes: #215
  • Loading branch information
TheRealWaldo committed Nov 2, 2023
1 parent 8150a8a commit dbde585
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/optimal_humidity/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit dbde585

Please sign in to comment.