Start energy load platform task eagerly (#113778)

pull/113796/head
J. Nick Koston 2024-03-18 21:44:39 -10:00 committed by GitHub
parent f51ac30b5a
commit 00f94feec9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,8 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
frontend.async_register_built_in_panel(hass, DOMAIN, DOMAIN, "mdi:lightning-bolt")
hass.async_create_task(
discovery.async_load_platform(hass, Platform.SENSOR, DOMAIN, {}, config)
discovery.async_load_platform(hass, Platform.SENSOR, DOMAIN, {}, config),
eager_start=True,
)
hass.data[DOMAIN] = {
"cost_sensors": {},