Skip to content

Commit 1ac0b00

Browse files
authored
Pass config_entry explicitly in rachio (#130865)
1 parent db5cc4f commit 1ac0b00

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

homeassistant/components/rachio/coordinator.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from rachiopy import Rachio
99
from requests.exceptions import Timeout
1010

11+
from homeassistant.config_entries import ConfigEntry
1112
from homeassistant.core import HomeAssistant
1213
from homeassistant.helpers.debounce import Debouncer
1314
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
@@ -38,6 +39,7 @@ def __init__(
3839
self,
3940
hass: HomeAssistant,
4041
rachio: Rachio,
42+
config_entry: ConfigEntry,
4143
base_station,
4244
base_count: int,
4345
) -> None:
@@ -48,6 +50,7 @@ def __init__(
4850
super().__init__(
4951
hass,
5052
_LOGGER,
53+
config_entry=config_entry,
5154
name=f"{DOMAIN} update coordinator",
5255
# To avoid exceeding the rate limit, increase polling interval for
5356
# each additional base station on the account
@@ -76,6 +79,7 @@ def __init__(
7679
self,
7780
hass: HomeAssistant,
7881
rachio: Rachio,
82+
config_entry: ConfigEntry,
7983
base_station,
8084
) -> None:
8185
"""Initialize a Rachio schedule coordinator."""
@@ -85,6 +89,7 @@ def __init__(
8589
super().__init__(
8690
hass,
8791
_LOGGER,
92+
config_entry=config_entry,
8893
name=f"{DOMAIN} schedule update coordinator",
8994
update_interval=timedelta(minutes=30),
9095
)

homeassistant/components/rachio/device.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,10 @@ def _setup(self, hass: HomeAssistant) -> None:
189189
RachioBaseStation(
190190
rachio,
191191
base,
192-
RachioUpdateCoordinator(hass, rachio, base, base_count),
193-
RachioScheduleUpdateCoordinator(hass, rachio, base),
192+
RachioUpdateCoordinator(
193+
hass, rachio, self.config_entry, base, base_count
194+
),
195+
RachioScheduleUpdateCoordinator(hass, rachio, self.config_entry, base),
194196
)
195197
for base in base_stations
196198
)

0 commit comments

Comments
 (0)