Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion homeassistant/components/rainmachine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,10 @@ async def _async_fetch_from_api(self, api_category):

return data

async def _async_update_listener_action(self, now):
"""Define an async_track_time_interval action to update data."""
await self.async_update()

@callback
def async_deregister_api_interest(self, api_category):
"""Decrement the number of entities with data needs from an API category."""
Expand All @@ -313,7 +317,7 @@ async def async_register_api_interest(self, api_category):
if not self._async_unsub_dispatcher_connect:
self._async_unsub_dispatcher_connect = async_track_time_interval(
self.hass,
self.async_update,
self._async_update_listener_action,
timedelta(seconds=self._scan_interval_seconds),
)

Expand Down