Small cleanups to rainmachine get_client_controller (#50250)
parent
80b05c39cc
commit
3a36a976ee
|
@ -22,9 +22,8 @@ DATA_SCHEMA = vol.Schema(
|
||||||
|
|
||||||
|
|
||||||
def get_client_controller(client):
|
def get_client_controller(client):
|
||||||
"""Enumerate controllers to find the first mac."""
|
"""Return the first local controller."""
|
||||||
for controller in client.controllers.values():
|
return next(iter(client.controllers.values()))
|
||||||
return controller
|
|
||||||
|
|
||||||
|
|
||||||
async def async_get_controller(hass, ip_address, password, port, ssl):
|
async def async_get_controller(hass, ip_address, password, port, ssl):
|
||||||
|
|
Loading…
Reference in New Issue