mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 10:59:40 +00:00
Rename service registration method in stookwijzer (#156034)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user