mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 02:49:40 +00:00
Use assignment expressions 34 (#58823)
This commit is contained in:
@@ -173,9 +173,7 @@ class EntityComponent:
|
||||
"""Unload a config entry."""
|
||||
key = config_entry.entry_id
|
||||
|
||||
platform = self._platforms.pop(key, None)
|
||||
|
||||
if platform is None:
|
||||
if (platform := self._platforms.pop(key, None)) is None:
|
||||
raise ValueError("Config entry was never loaded!")
|
||||
|
||||
await platform.async_reset()
|
||||
|
||||
Reference in New Issue
Block a user