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