mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Address flume post merge review comments (#102807)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
70ad5ab3e4
commit
10e7622e38
@ -16,6 +16,7 @@ from homeassistant.core import (
|
|||||||
ServiceCall,
|
ServiceCall,
|
||||||
ServiceResponse,
|
ServiceResponse,
|
||||||
SupportsResponse,
|
SupportsResponse,
|
||||||
|
callback,
|
||||||
)
|
)
|
||||||
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
|
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
|
||||||
from homeassistant.helpers.selector import ConfigEntrySelector
|
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 hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
||||||
await async_setup_service(hass)
|
setup_service(hass)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@ -105,10 +106,11 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
return unload_ok
|
return unload_ok
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_service(hass: HomeAssistant) -> None:
|
def setup_service(hass: HomeAssistant) -> None:
|
||||||
"""Add the services for the flume integration."""
|
"""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."""
|
"""Return the user notifications."""
|
||||||
entry_id: str = call.data[CONF_CONFIG_ENTRY]
|
entry_id: str = call.data[CONF_CONFIG_ENTRY]
|
||||||
entry: ConfigEntry | None = hass.config_entries.async_get_entry(entry_id)
|
entry: ConfigEntry | None = hass.config_entries.async_get_entry(entry_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user