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

View File

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