mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +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,
|
get_valueless_base_unique_id,
|
||||||
)
|
)
|
||||||
from .migrate import async_migrate_discovered_value
|
from .migrate import async_migrate_discovered_value
|
||||||
from .services import ZWaveServices
|
from .services import async_setup_services
|
||||||
|
|
||||||
CONNECT_TIMEOUT = 10
|
CONNECT_TIMEOUT = 10
|
||||||
DATA_DRIVER_EVENTS = "driver_events"
|
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)
|
entry, unique_id=str(entry.unique_id)
|
||||||
)
|
)
|
||||||
|
|
||||||
dev_reg = dr.async_get(hass)
|
async_setup_services(hass)
|
||||||
ent_reg = er.async_get(hass)
|
|
||||||
services = ZWaveServices(hass, ent_reg, dev_reg)
|
|
||||||
services.async_register()
|
|
||||||
|
|
||||||
return True
|
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(
|
def parameter_name_does_not_need_bitmask(
|
||||||
val: dict[str, int | str | list[str]],
|
val: dict[str, int | str | list[str]],
|
||||||
) -> dict[str, int | str | list[str]]:
|
) -> dict[str, int | str | list[str]]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user