mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Tweak zwave_js service registration (#146244)
This commit is contained in:
parent
6bf8b84d26
commit
fd93cf375d
@ -133,7 +133,7 @@ from .helpers import (
|
||||
get_valueless_base_unique_id,
|
||||
)
|
||||
from .migrate import async_migrate_discovered_value
|
||||
from .services import ZWaveServices
|
||||
from .services import async_setup_services
|
||||
|
||||
CONNECT_TIMEOUT = 10
|
||||
DATA_DRIVER_EVENTS = "driver_events"
|
||||
@ -177,10 +177,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
entry, unique_id=str(entry.unique_id)
|
||||
)
|
||||
|
||||
dev_reg = dr.async_get(hass)
|
||||
ent_reg = er.async_get(hass)
|
||||
services = ZWaveServices(hass, ent_reg, dev_reg)
|
||||
services.async_register()
|
||||
async_setup_services(hass)
|
||||
|
||||
return True
|
||||
|
||||
|
@ -58,6 +58,12 @@ TARGET_VALIDATORS = {
|
||||
}
|
||||
|
||||
|
||||
def async_setup_services(hass: HomeAssistant) -> None:
|
||||
"""Register integration services."""
|
||||
services = ZWaveServices(hass, er.async_get(hass), dr.async_get(hass))
|
||||
services.async_register()
|
||||
|
||||
|
||||
def parameter_name_does_not_need_bitmask(
|
||||
val: dict[str, int | str | list[str]],
|
||||
) -> dict[str, int | str | list[str]]:
|
||||
|
Loading…
x
Reference in New Issue
Block a user