mirror of
https://github.com/home-assistant/core
synced 2024-07-18 12:02:20 +02:00
Don't attempt to reload MQTT device tracker (#73577)
This commit is contained in:
parent
9680a367c8
commit
cd08f1d0c0
@ -80,6 +80,7 @@ from .const import ( # noqa: F401
|
||||
MQTT_DISCONNECTED,
|
||||
MQTT_RELOADED,
|
||||
PLATFORMS,
|
||||
RELOADABLE_PLATFORMS,
|
||||
)
|
||||
from .models import ( # noqa: F401
|
||||
MqttCommandTemplate,
|
||||
@ -380,7 +381,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
# Setup reload service. Once support for legacy config is removed in 2022.9, we
|
||||
# should no longer call async_setup_reload_service but instead implement a custom
|
||||
# service
|
||||
await async_setup_reload_service(hass, DOMAIN, PLATFORMS)
|
||||
await async_setup_reload_service(hass, DOMAIN, RELOADABLE_PLATFORMS)
|
||||
|
||||
async def _async_reload_platforms(_: Event | None) -> None:
|
||||
"""Discover entities for a platform."""
|
||||
|
@ -92,3 +92,23 @@ PLATFORMS = [
|
||||
Platform.SWITCH,
|
||||
Platform.VACUUM,
|
||||
]
|
||||
|
||||
RELOADABLE_PLATFORMS = [
|
||||
Platform.ALARM_CONTROL_PANEL,
|
||||
Platform.BINARY_SENSOR,
|
||||
Platform.BUTTON,
|
||||
Platform.CAMERA,
|
||||
Platform.CLIMATE,
|
||||
Platform.COVER,
|
||||
Platform.FAN,
|
||||
Platform.HUMIDIFIER,
|
||||
Platform.LIGHT,
|
||||
Platform.LOCK,
|
||||
Platform.NUMBER,
|
||||
Platform.SELECT,
|
||||
Platform.SCENE,
|
||||
Platform.SENSOR,
|
||||
Platform.SIREN,
|
||||
Platform.SWITCH,
|
||||
Platform.VACUUM,
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user