Import persistent notification (part 2) (#63899)

This commit is contained in:
Erik Montnemery 2022-01-13 08:42:50 +01:00 committed by GitHub
parent bc7624b417
commit 03593aa21b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 40 additions and 23 deletions

View file

@ -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: