diff --git a/src/state/context-mixin.ts b/src/state/context-mixin.ts index 9b8e2a8bb7..d3bbc3ead6 100644 --- a/src/state/context-mixin.ts +++ b/src/state/context-mixin.ts @@ -82,6 +82,15 @@ export const contextMixin = >( }), }; + protected hassConnected() { + super.hassConnected(); + for (const [key, value] of Object.entries(this.hass!)) { + if (key in this.__contextProviders) { + this.__contextProviders[key]!.setValue(value); + } + } + } + protected _updateHass(obj: Partial) { super._updateHass(obj); for (const [key, value] of Object.entries(obj)) {