Small cleanups to rainmachine get_client_controller (#50250)

pull/50307/head
J. Nick Koston 2021-05-07 13:07:06 -05:00 committed by GitHub
parent 80b05c39cc
commit 3a36a976ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -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):