From 71455524b18f6c5039c73c5d1e0f60c9557d5a0c Mon Sep 17 00:00:00 2001 From: cryptk <421501+cryptk@users.noreply.github.com> Date: Wed, 8 Jan 2025 12:29:48 -0600 Subject: [PATCH] fix: water heaters are always in fahrenheit. fixes #96, fixes #127 (#134) --- custom_components/omnilogic_local/water_heater.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/custom_components/omnilogic_local/water_heater.py b/custom_components/omnilogic_local/water_heater.py index 5533c67..f12f5aa 100644 --- a/custom_components/omnilogic_local/water_heater.py +++ b/custom_components/omnilogic_local/water_heater.py @@ -80,7 +80,9 @@ def __init__(self, coordinator: OmniLogicCoordinator, context: int, heater_equip @property def temperature_unit(self) -> str: - return str(UnitOfTemperature.CELSIUS) if self.get_system_config().units == "Metric" else str(UnitOfTemperature.FAHRENHEIT) + # Heaters always return their values in Fahrenheit, no matter what units the system is set to + # https://github.com/cryptk/haomnilogic-local/issues/96 + return UnitOfTemperature.FAHRENHEIT @property def min_temp(self) -> float: