Remove unused homekit.start service (#62827)

This commit is contained in:
J. Nick Koston 2021-12-26 23:12:02 -10:00 committed by GitHub
parent a721927b9a
commit 7a46e04fd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 26 deletions

View file

@ -91,7 +91,6 @@ from .const import (
MANUFACTURER,
PERSIST_LOCK,
SERVICE_HOMEKIT_RESET_ACCESSORY,
SERVICE_HOMEKIT_START,
SERVICE_HOMEKIT_UNPAIR,
SHUTDOWN_TIMEOUT,
)
@ -418,26 +417,6 @@ def _async_register_events_and_services(hass: HomeAssistant):
schema=UNPAIR_SERVICE_SCHEMA,
)
async def async_handle_homekit_service_start(service):
"""Handle start HomeKit service call."""
tasks = []
for homekit in _async_all_homekit_instances(hass):
if homekit.status == STATUS_RUNNING:
_LOGGER.debug("HomeKit is already running")
continue
if homekit.status != STATUS_READY:
_LOGGER.warning(
"HomeKit is not ready. Either it is already starting up or has "
"been stopped"
)
continue
tasks.append(homekit.async_start())
await asyncio.gather(*tasks)
hass.services.async_register(
DOMAIN, SERVICE_HOMEKIT_START, async_handle_homekit_service_start
)
async def _handle_homekit_reload(service):
"""Handle start HomeKit service call."""
config = await async_integration_yaml_config(hass, DOMAIN)