mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-19 15:16:33 +00:00
use set for speedup
This commit is contained in:
parent
e78d935824
commit
4915c935dd
@ -54,8 +54,8 @@ class APIAddons(object):
|
|||||||
"""Return a simplified device list."""
|
"""Return a simplified device list."""
|
||||||
dev_list = addon.devices
|
dev_list = addon.devices
|
||||||
if not dev_list:
|
if not dev_list:
|
||||||
return []
|
return
|
||||||
return [row.split(':')[0] for row in dev_list]
|
return set(row.split(':')[0] for row in dev_list)
|
||||||
|
|
||||||
@api_process
|
@api_process
|
||||||
async def list(self, request):
|
async def list(self, request):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user