From 30bbfc6c064a1f3843099c5b0599256f86246260 Mon Sep 17 00:00:00 2001 From: basbruss <4a3.brussee.bas@gmail.com> Date: Thu, 23 May 2024 21:32:29 +0200 Subject: [PATCH] Update calculation.py --- custom_components/adaptive_cover/calculation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/adaptive_cover/calculation.py b/custom_components/adaptive_cover/calculation.py index 6790d56..94f3fe8 100644 --- a/custom_components/adaptive_cover/calculation.py +++ b/custom_components/adaptive_cover/calculation.py @@ -196,13 +196,13 @@ class ClimateCoverData: def outside_temperature(self): """Get outside temperature.""" temp = None - if self.weather_entity: - temp = state_attr(self.hass, self.weather_entity, "temperature") if self.outside_entity: temp = get_safe_state( self.hass, self.outside_entity, ) + if self.weather_entity: + temp = state_attr(self.hass, self.weather_entity, "temperature") return temp @property