From dc7739d53bb80f2dd481484c23c2a724596bca81 Mon Sep 17 00:00:00 2001 From: Jean-Marc Collin Date: Sun, 8 Dec 2024 17:18:02 +0000 Subject: [PATCH] Fix slope None --- custom_components/versatile_thermostat/thermostat_climate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/versatile_thermostat/thermostat_climate.py b/custom_components/versatile_thermostat/thermostat_climate.py index 9160971..7bf8d50 100644 --- a/custom_components/versatile_thermostat/thermostat_climate.py +++ b/custom_components/versatile_thermostat/thermostat_climate.py @@ -1005,7 +1005,7 @@ class ThermostatOverClimate(BaseThermostat[UnderlyingClimate]): "saved_hvac_mode": self._saved_hvac_mode, "target_temperature": self.target_temperature, "current_temperature": self.current_temperature, - "temperature_slope": round(self.last_temperature_slope, 3), + "temperature_slope": round(self.last_temperature_slope or 0, 3), "accumulated_error": self._auto_start_stop_algo.accumulated_error, "accumulated_error_threshold": self._auto_start_stop_algo.accumulated_error_threshold, },