mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Explicitly pass in the config_entry in picnic coordinator init (#137465)
explicitly pass in the config_entry in coordinator init
This commit is contained in:
parent
0248252906
commit
6d13aa3741
@ -21,6 +21,8 @@ from .const import ADDRESS, CART_DATA, LAST_ORDER_DATA, NEXT_DELIVERY_DATA, SLOT
|
||||
class PicnicUpdateCoordinator(DataUpdateCoordinator):
|
||||
"""The coordinator to fetch data from the Picnic API at a set interval."""
|
||||
|
||||
config_entry: ConfigEntry
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
hass: HomeAssistant,
|
||||
@ -29,13 +31,13 @@ class PicnicUpdateCoordinator(DataUpdateCoordinator):
|
||||
) -> None:
|
||||
"""Initialize the coordinator with the given Picnic API client."""
|
||||
self.picnic_api_client = picnic_api_client
|
||||
self.config_entry = config_entry
|
||||
self._user_address = None
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
super().__init__(
|
||||
hass,
|
||||
logger,
|
||||
config_entry=config_entry,
|
||||
name="Picnic coordinator",
|
||||
update_interval=timedelta(minutes=30),
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user