Simplify core state cache clear (#114694)

same as #113136 but for core
This commit is contained in:
J. Nick Koston 2024-04-03 00:20:32 -10:00 committed by GitHub
parent 742643936f
commit cf4c02b9fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -440,8 +440,7 @@ class HomeAssistant:
"""Set the current state.""" """Set the current state."""
self.state = state self.state = state
for prop in ("is_running", "is_stopping"): for prop in ("is_running", "is_stopping"):
with suppress(AttributeError): self.__dict__.pop(prop, None)
delattr(self, prop)
def start(self) -> int: def start(self) -> int:
"""Start Home Assistant. """Start Home Assistant.