Skip to content

Commit d63fdf7

Browse files
authored
Rename service registration method in amberelectric (home-assistant#156032)
1 parent d6eaa9f commit d63fdf7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

homeassistant/components/amberelectric/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99

1010
from .const import CONF_SITE_ID, DOMAIN, PLATFORMS
1111
from .coordinator import AmberConfigEntry, AmberUpdateCoordinator
12-
from .services import setup_services
12+
from .services import async_setup_services
1313

1414
CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN)
1515

1616

1717
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
1818
"""Set up the Amber component."""
19-
setup_services(hass)
19+
async_setup_services(hass)
2020
return True
2121

2222

homeassistant/components/amberelectric/services.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
ServiceCall,
1111
ServiceResponse,
1212
SupportsResponse,
13+
callback,
1314
)
1415
from homeassistant.exceptions import ServiceValidationError
1516
from homeassistant.helpers.selector import ConfigEntrySelector
@@ -102,7 +103,8 @@ def get_forecasts(channel_type: str, data: dict) -> list[JsonValueType]:
102103
return results
103104

104105

105-
def setup_services(hass: HomeAssistant) -> None:
106+
@callback
107+
def async_setup_services(hass: HomeAssistant) -> None:
106108
"""Set up the services for the Amber integration."""
107109

108110
async def handle_get_forecasts(call: ServiceCall) -> ServiceResponse:

0 commit comments

Comments
 (0)