Address flume post merge review comments (#102807)

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
tronikos 2023-11-10 02:20:58 -08:00 committed by GitHub
parent 70ad5ab3e4
commit 10e7622e38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,7 @@ from homeassistant.core import (
ServiceCall,
ServiceResponse,
SupportsResponse,
callback,
)
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
from homeassistant.helpers.selector import ConfigEntrySelector
@ -88,7 +89,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
}
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
await async_setup_service(hass)
setup_service(hass)
return True
@ -105,10 +106,11 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
return unload_ok
async def async_setup_service(hass: HomeAssistant) -> None:
def setup_service(hass: HomeAssistant) -> None:
"""Add the services for the flume integration."""
async def list_notifications(call: ServiceCall) -> ServiceResponse:
@callback
def list_notifications(call: ServiceCall) -> ServiceResponse:
"""Return the user notifications."""
entry_id: str = call.data[CONF_CONFIG_ENTRY]
entry: ConfigEntry | None = hass.config_entries.async_get_entry(entry_id)