Prevent unnecessary updates of zone component (#38167)

This commit is contained in:
Daniel Hjelseth Høyer 2020-07-24 22:45:34 +02:00 committed by GitHub
parent 69203b5373
commit 8943954b18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -323,6 +323,8 @@ class Zone(entity.Entity):
async def async_update_config(self, config: Dict) -> None:
"""Handle when the config is updated."""
if self._config == config:
return
self._config = config
self._generate_attrs()
self.async_write_ha_state()