mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 09:17:53 +00:00
Prevent unnecessary updates of sun component (#38169)
This commit is contained in:
parent
8943954b18
commit
9fe142a114
@ -100,7 +100,10 @@ class Sun(Entity):
|
||||
self._next_change = None
|
||||
|
||||
def update_location(_event):
|
||||
self.location = get_astral_location(self.hass)
|
||||
location = get_astral_location(self.hass)
|
||||
if location == self.location:
|
||||
return
|
||||
self.location = location
|
||||
self.update_events(dt_util.utcnow())
|
||||
|
||||
update_location(None)
|
||||
|
Loading…
x
Reference in New Issue
Block a user