Refactor hardware.async_info to return list[HardwareInfo] (#77183)
This commit is contained in:
parent
0154a1cecb
commit
067d21a307
10 changed files with 81 additions and 74 deletions
|
@ -42,6 +42,6 @@ async def ws_info(
|
|||
for platform in hardware_platform.values():
|
||||
if hasattr(platform, "async_info"):
|
||||
with contextlib.suppress(HomeAssistantError):
|
||||
hardware_info.append(asdict(platform.async_info(hass)))
|
||||
hardware_info.extend([asdict(hw) for hw in platform.async_info(hass)])
|
||||
|
||||
connection.send_result(msg["id"], {"hardware": hardware_info})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue