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