Migrate zone to use collection helpers (#30774)

This commit is contained in:
Paulus Schoutsen 2020-01-22 12:36:25 -08:00 committed by GitHub
parent 4c27d6b9aa
commit 0fba9e44ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 762 additions and 1209 deletions

View file

@ -284,7 +284,7 @@ class Entity(ABC):
self._async_write_ha_state()
@callback
def async_write_ha_state(self):
def async_write_ha_state(self) -> None:
"""Write the state to the state machine."""
if self.hass is None:
raise RuntimeError(f"Attribute hass is None for {self}")
@ -294,7 +294,7 @@ class Entity(ABC):
f"No entity id specified for entity {self.name}"
)
self._async_write_ha_state()
self._async_write_ha_state() # type: ignore
@callback
def _async_write_ha_state(self):