Skip to content

Commit

Permalink
Merge pull request #169 from basbruss/166-prioritize-outside-temperat…
Browse files Browse the repository at this point in the history
…ure-sensor-over-weather-information

Prioritize outside temperature sensor over weather entity
  • Loading branch information
basbruss authored May 23, 2024
2 parents cebef26 + 30bbfc6 commit 31563aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/adaptive_cover/calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 31563aa

Please sign in to comment.