mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
fix initialization
This commit is contained in:
parent
1b874c603b
commit
aa74c4e57a
@ -36,13 +36,9 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
""" Sets up the Sonos platform. """
|
""" Sets up the Sonos platform. """
|
||||||
|
|
||||||
import soco
|
import soco
|
||||||
players = []
|
add_devices(SonosDevice(p) for p in soco.discover())
|
||||||
for player in soco.discover():
|
|
||||||
device = SonosDevice(player)
|
|
||||||
players.append(device)
|
|
||||||
|
|
||||||
if players:
|
return True
|
||||||
return True
|
|
||||||
|
|
||||||
|
|
||||||
# pylint: disable=too-many-instance-attributes
|
# pylint: disable=too-many-instance-attributes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user