mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 02:07:09 +00:00
Remove unused homekit.start service (#62827)
This commit is contained in:
parent
a721927b9a
commit
7a46e04fd1
@ -91,7 +91,6 @@ from .const import (
|
|||||||
MANUFACTURER,
|
MANUFACTURER,
|
||||||
PERSIST_LOCK,
|
PERSIST_LOCK,
|
||||||
SERVICE_HOMEKIT_RESET_ACCESSORY,
|
SERVICE_HOMEKIT_RESET_ACCESSORY,
|
||||||
SERVICE_HOMEKIT_START,
|
|
||||||
SERVICE_HOMEKIT_UNPAIR,
|
SERVICE_HOMEKIT_UNPAIR,
|
||||||
SHUTDOWN_TIMEOUT,
|
SHUTDOWN_TIMEOUT,
|
||||||
)
|
)
|
||||||
@ -418,26 +417,6 @@ def _async_register_events_and_services(hass: HomeAssistant):
|
|||||||
schema=UNPAIR_SERVICE_SCHEMA,
|
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):
|
async def _handle_homekit_reload(service):
|
||||||
"""Handle start HomeKit service call."""
|
"""Handle start HomeKit service call."""
|
||||||
config = await async_integration_yaml_config(hass, DOMAIN)
|
config = await async_integration_yaml_config(hass, DOMAIN)
|
||||||
|
@ -92,7 +92,6 @@ DEFAULT_HOMEKIT_MODE = HOMEKIT_MODE_BRIDGE
|
|||||||
HOMEKIT_MODES = [HOMEKIT_MODE_BRIDGE, HOMEKIT_MODE_ACCESSORY]
|
HOMEKIT_MODES = [HOMEKIT_MODE_BRIDGE, HOMEKIT_MODE_ACCESSORY]
|
||||||
|
|
||||||
# #### HomeKit Component Services ####
|
# #### HomeKit Component Services ####
|
||||||
SERVICE_HOMEKIT_START = "start"
|
|
||||||
SERVICE_HOMEKIT_RESET_ACCESSORY = "reset_accessory"
|
SERVICE_HOMEKIT_RESET_ACCESSORY = "reset_accessory"
|
||||||
SERVICE_HOMEKIT_UNPAIR = "unpair"
|
SERVICE_HOMEKIT_UNPAIR = "unpair"
|
||||||
|
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
# Describes the format for available HomeKit services
|
# Describes the format for available HomeKit services
|
||||||
|
|
||||||
start:
|
|
||||||
name: Start
|
|
||||||
description: Starts the HomeKit driver
|
|
||||||
|
|
||||||
reload:
|
reload:
|
||||||
name: Reload
|
name: Reload
|
||||||
description: Reload homekit and re-process YAML configuration
|
description: Reload homekit and re-process YAML configuration
|
||||||
|
Loading…
x
Reference in New Issue
Block a user