Skip to content

Commit

Permalink
remove listen
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Mar 14, 2020
1 parent 948baa4 commit cb49fa3
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions homeassistant/components/rachio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
return False
_LOGGER.info("%d Rachio device(s) found", len(person.controllers))

await person.async_setup()

# Enable component
hass.data[DOMAIN][entry.entry_id] = person

Expand Down Expand Up @@ -227,25 +225,6 @@ def __init__(self, hass, rachio, config_entry):
)
_LOGGER.info('Using Rachio API as user "%s"', self.username)

@staticmethod
async def _async_update_listener(hass, config_entry):
"""Update when config_entry options update."""
person = hass.data[DOMAIN][config_entry.entry_id]
old_manual_run_mins = person.config_entry.options[CONF_MANUAL_RUN_MINS]
new_manual_run_mins = config_entry.options.get(CONF_MANUAL_RUN_MINS)
person.config_entry.options[CONF_MANUAL_RUN_MINS] = new_manual_run_mins
_LOGGER.debug(
"Changing %s from %s to %s",
CONF_MANUAL_RUN_MINS,
old_manual_run_mins,
new_manual_run_mins,
)

async def async_setup(self):
"""Set up an update listener."""
self.config_entry.add_update_listener(self._async_update_listener)
return True

@property
def user_id(self) -> str:
"""Get the user ID as defined by the Rachio API."""
Expand Down

0 comments on commit cb49fa3

Please sign in to comment.