Import persistent notification (part 2) (#63899)
This commit is contained in:
parent
bc7624b417
commit
03593aa21b
10 changed files with 40 additions and 23 deletions
|
@ -10,6 +10,7 @@ from typing import Any
|
|||
import aiohttp
|
||||
from hass_nabucasa.client import CloudClient as Interface
|
||||
|
||||
from homeassistant.components import persistent_notification
|
||||
from homeassistant.components.alexa import (
|
||||
errors as alexa_errors,
|
||||
smart_home as alexa_sh,
|
||||
|
@ -163,9 +164,7 @@ class CloudClient(Interface):
|
|||
@callback
|
||||
def user_message(self, identifier: str, title: str, message: str) -> None:
|
||||
"""Create a message for user to UI."""
|
||||
self._hass.components.persistent_notification.async_create(
|
||||
message, title, identifier
|
||||
)
|
||||
persistent_notification.async_create(self._hass, message, title, identifier)
|
||||
|
||||
@callback
|
||||
def dispatcher_message(self, identifier: str, data: Any = None) -> None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue