mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Use eager_start to load utility_meter platforms (#114699)
This commit is contained in:
parent
4a879ce424
commit
be3c923c7f
@ -150,7 +150,8 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||||||
DOMAIN,
|
DOMAIN,
|
||||||
{meter: {CONF_METER: meter}},
|
{meter: {CONF_METER: meter}},
|
||||||
config,
|
config,
|
||||||
)
|
),
|
||||||
|
eager_start=True,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
# create tariff selection
|
# create tariff selection
|
||||||
@ -161,7 +162,8 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||||||
DOMAIN,
|
DOMAIN,
|
||||||
{CONF_METER: meter, CONF_TARIFFS: conf[CONF_TARIFFS]},
|
{CONF_METER: meter, CONF_TARIFFS: conf[CONF_TARIFFS]},
|
||||||
config,
|
config,
|
||||||
)
|
),
|
||||||
|
eager_start=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
hass.data[DATA_UTILITY][meter][CONF_TARIFF_ENTITY] = (
|
hass.data[DATA_UTILITY][meter][CONF_TARIFF_ENTITY] = (
|
||||||
@ -180,7 +182,8 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||||||
hass.async_create_task(
|
hass.async_create_task(
|
||||||
discovery.async_load_platform(
|
discovery.async_load_platform(
|
||||||
hass, SENSOR_DOMAIN, DOMAIN, tariff_confs, config
|
hass, SENSOR_DOMAIN, DOMAIN, tariff_confs, config
|
||||||
)
|
),
|
||||||
|
eager_start=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user