fix: the deprecated listener+reload combo is gone — reauth uses async_update_reload_and_abort(_get_reauth_entry()), zeroconf host update is update-only, the __init__ options-reload listener is removed (grep-pinned); host-change tests assert update-without-reload (t29 G3a)
This commit is contained in:
1 parent
3e0208789a
commit
bcb8b962e7
6 files changed
+158
-50
No files matched your search
@@ -25,6 +25,7 @@ from .const import (
|
||||
CONF_PROTOCOL_ENABLED,
|
||||
CONF_PROTOCOL_HOST,
|
||||
DOMAIN,
|
||||
SERVICE_ADB_COMMAND,
|
||||
)
|
||||
from .helpers import discover_adb_host, protocol_cert_paths, resolve_adb_config
|
||||
|
||||
@@ -33,6 +34,25 @@ _LOGGER = logging.getLogger(__name__)
|
||||
PLATFORMS = [Platform.MEDIA_PLAYER, Platform.SENSOR, Platform.REMOTE, Platform.BUTTON]
|
||||
|
||||
|
||||
async def async_setup(hass: HomeAssistant, config) -> bool:
|
||||
"""Register the integration's services (t29 G8, always-on).
|
||||
|
||||
``adb_command`` exists regardless of loaded entries or option state —
|
||||
the entry's adb_command_enabled option gates USE (participants self-
|
||||
register from the media_player platform), so automations validate and
|
||||
errors are informative instead of 'service not found'.
|
||||
"""
|
||||
from .media_player import _ADB_COMMAND_SCHEMA, _async_adb_command_service
|
||||
|
||||
hass.services.async_register(
|
||||
DOMAIN,
|
||||
SERVICE_ADB_COMMAND,
|
||||
_async_adb_command_service,
|
||||
schema=_ADB_COMMAND_SCHEMA,
|
||||
)
|
||||
return True
|
||||
|
||||
|
||||
async def _build_poller_factory(hass: HomeAssistant, entry: ConfigEntry):
|
||||
"""Poller factory when ADB is configured AND usable today, else None.
|
||||
|
||||
|
||||
Reference in new issue
Block a user