mirror of
https://github.com/home-assistant/core.git
synced 2025-09-10 07:11:37 +02:00
Fix Tibber coordinator ContextVar warning (#150229)
This commit is contained in:
@@ -299,7 +299,10 @@ async def async_setup_entry(
|
|||||||
)
|
)
|
||||||
await home.rt_subscribe(
|
await home.rt_subscribe(
|
||||||
TibberRtDataCoordinator(
|
TibberRtDataCoordinator(
|
||||||
entity_creator.add_sensors, home, hass
|
hass,
|
||||||
|
entry,
|
||||||
|
entity_creator.add_sensors,
|
||||||
|
home,
|
||||||
).async_set_updated_data
|
).async_set_updated_data
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -613,15 +616,17 @@ class TibberRtDataCoordinator(DataUpdateCoordinator): # pylint: disable=hass-en
|
|||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
hass: HomeAssistant,
|
||||||
|
config_entry: ConfigEntry,
|
||||||
add_sensor_callback: Callable[[TibberRtDataCoordinator, Any], None],
|
add_sensor_callback: Callable[[TibberRtDataCoordinator, Any], None],
|
||||||
tibber_home: tibber.TibberHome,
|
tibber_home: tibber.TibberHome,
|
||||||
hass: HomeAssistant,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Initialize the data handler."""
|
"""Initialize the data handler."""
|
||||||
self._add_sensor_callback = add_sensor_callback
|
self._add_sensor_callback = add_sensor_callback
|
||||||
super().__init__(
|
super().__init__(
|
||||||
hass,
|
hass,
|
||||||
_LOGGER,
|
_LOGGER,
|
||||||
|
config_entry=config_entry,
|
||||||
name=tibber_home.info["viewer"]["home"]["address"].get(
|
name=tibber_home.info["viewer"]["home"]["address"].get(
|
||||||
"address1", "Tibber"
|
"address1", "Tibber"
|
||||||
),
|
),
|
||||||
|
Reference in New Issue
Block a user