Complete persistent notifications migration (#92828)

* Complete migration of persistent notifications

Persistent notifications are no longer stored in
the state machine and no longer fire events

* Complete migration of persistent notifications

Persistent notifications are no longer stored in
the state machine and no longer fire events

* fixes

* fixes

* fixes

* ws test

* update tests

* update tests

* fix more tests

* fix more tests

* more fixes

* fix

* fix person

* fix person

* keep whitelist

* use singleton
This commit is contained in:
J. Nick Koston
2023-05-25 22:09:13 -05:00
committed by GitHub
parent e2b69fc470
commit 48485fc2bf
17 changed files with 310 additions and 195 deletions

View File

@@ -8,7 +8,7 @@ from homeassistant.components import http, hue
from homeassistant.components.hue import light as hue_light
from homeassistant.core import HomeAssistant, callback
from .common import MockModule, mock_integration
from .common import MockModule, async_get_persistent_notifications, mock_integration
async def test_component_dependencies(hass: HomeAssistant) -> None:
@@ -61,7 +61,8 @@ async def test_component_wrapper(hass: HomeAssistant) -> None:
components = loader.Components(hass)
components.persistent_notification.async_create("message")
assert len(hass.states.async_entity_ids("persistent_notification")) == 1
notifications = async_get_persistent_notifications(hass)
assert len(notifications)
async def test_helpers_wrapper(hass: HomeAssistant) -> None: