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."""
self.state = state
for prop in ("is_running", "is_stopping"):
with suppress(AttributeError):
delattr(self, prop)
self.__dict__.pop(prop, None)
def start(self) -> int:
"""Start Home Assistant.