Drop MQTT import flow (#66160)
* Drop MQTT import flow * Reload manually configured MQTT entities when config entry is setup * Address review comments * Actually remove the import flow
This commit is contained in:
parent
dc7ab40acd
commit
fe38e6ba87
45 changed files with 494 additions and 155 deletions
|
@ -8,11 +8,9 @@ import voluptuous as vol
|
|||
from homeassistant.components import light
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.reload import async_setup_reload_service
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
|
||||
from .. import DOMAIN, PLATFORMS
|
||||
from ..mixins import async_setup_entry_helper
|
||||
from ..mixins import async_setup_entry_helper, async_setup_platform_helper
|
||||
from .schema import CONF_SCHEMA, MQTT_LIGHT_SCHEMA_SCHEMA
|
||||
from .schema_basic import (
|
||||
DISCOVERY_SCHEMA_BASIC,
|
||||
|
@ -69,8 +67,9 @@ async def async_setup_platform(
|
|||
discovery_info: DiscoveryInfoType | None = None,
|
||||
) -> None:
|
||||
"""Set up MQTT light through configuration.yaml."""
|
||||
await async_setup_reload_service(hass, DOMAIN, PLATFORMS)
|
||||
await _async_setup_entity(hass, async_add_entities, config)
|
||||
await async_setup_platform_helper(
|
||||
hass, light.DOMAIN, config, async_add_entities, _async_setup_entity
|
||||
)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue