fix: Fix initialization race condition that occurs in certain circumstances (#1545)

* fix: Fix initialization race condition in certain circumstances

* Minor improvements and camera iris logo
This commit is contained in:
Dermot Duffy
2024-09-19 19:42:38 -07:00
committed by GitHub
parent af4666e023
commit 650d99ec00
26 changed files with 611 additions and 461 deletions
@@ -67,7 +67,12 @@ export class CardElementManager {
this._api.getMediaLoadedInfoManager().initialize();
this._api.getMicrophoneManager().initialize();
this._api.getKeyboardStateManager().initialize();
// These initializers are called when the config is updated, but on initial
// creation of the card hass is not yet available when the config is first
// loaded.
this._api.getDefaultManager().initialize();
this._api.getMediaPlayerManager().initialize();
this._api
.getHASSManager()
@@ -146,6 +151,8 @@ export class CardElementManager {
// reconnection, to ensure the state subscription/unsubscription works
// correctly for triggers.
this._api.getInitializationManager().uninitialize(InitializationAspect.CAMERAS);
this._api.getCameraManager().reset();
this._element.removeEventListener(
'mousemove',
this._api.getInteractionManager().reportInteraction,