mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +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):
|
class PicnicUpdateCoordinator(DataUpdateCoordinator):
|
||||||
"""The coordinator to fetch data from the Picnic API at a set interval."""
|
"""The coordinator to fetch data from the Picnic API at a set interval."""
|
||||||
|
|
||||||
|
config_entry: ConfigEntry
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
@ -29,13 +31,13 @@ class PicnicUpdateCoordinator(DataUpdateCoordinator):
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Initialize the coordinator with the given Picnic API client."""
|
"""Initialize the coordinator with the given Picnic API client."""
|
||||||
self.picnic_api_client = picnic_api_client
|
self.picnic_api_client = picnic_api_client
|
||||||
self.config_entry = config_entry
|
|
||||||
self._user_address = None
|
self._user_address = None
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
super().__init__(
|
super().__init__(
|
||||||
hass,
|
hass,
|
||||||
logger,
|
logger,
|
||||||
|
config_entry=config_entry,
|
||||||
name="Picnic coordinator",
|
name="Picnic coordinator",
|
||||||
update_interval=timedelta(minutes=30),
|
update_interval=timedelta(minutes=30),
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user