mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Remove old type casting in esphome (#75475)
This commit is contained in:
parent
c29bd48373
commit
672883e19d
@ -562,13 +562,11 @@ async def platform_async_setup_entry(
|
||||
"""Update entities of this platform when entities are listed."""
|
||||
old_infos = entry_data.info[component_key]
|
||||
new_infos: dict[int, EntityInfo] = {}
|
||||
add_entities = []
|
||||
add_entities: list[_EntityT] = []
|
||||
for info in infos:
|
||||
if not isinstance(info, info_type):
|
||||
# Filter out infos that don't belong to this platform.
|
||||
continue
|
||||
# cast back to upper type, otherwise mypy gets confused
|
||||
info = cast(EntityInfo, info)
|
||||
|
||||
if info.key in old_infos:
|
||||
# Update existing entity
|
||||
|
Loading…
x
Reference in New Issue
Block a user