Rename service registration method in stookwijzer (#156034)

This commit is contained in:
epenet
2025-11-07 13:07:30 +01:00
committed by GitHub
parent c9e76ae5d4
commit 94e30485c4
2 changed files with 5 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ from homeassistant.helpers.typing import ConfigType
from .const import DOMAIN, LOGGER
from .coordinator import StookwijzerConfigEntry, StookwijzerCoordinator
from .services import setup_services
from .services import async_setup_services
PLATFORMS = [Platform.SENSOR]
@@ -26,7 +26,7 @@ CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN)
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up the Stookwijzer component."""
setup_services(hass)
async_setup_services(hass)
return True

View File

@@ -11,6 +11,7 @@ from homeassistant.core import (
ServiceCall,
ServiceResponse,
SupportsResponse,
callback,
)
from homeassistant.exceptions import ServiceValidationError
@@ -51,7 +52,8 @@ def async_get_entry(
return cast(StookwijzerConfigEntry, entry)
def setup_services(hass: HomeAssistant) -> None:
@callback
def async_setup_services(hass: HomeAssistant) -> None:
"""Set up the services for the Stookwijzer integration."""
async def async_get_forecast(call: ServiceCall) -> ServiceResponse | None: