mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix context provider not updated on initializing of hass object (#16159)
This commit is contained in:
parent
1a9b99dd72
commit
fbb59b1459
@ -82,6 +82,15 @@ export const contextMixin = <T extends Constructor<HassBaseEl>>(
|
|||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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<HomeAssistant>) {
|
protected _updateHass(obj: Partial<HomeAssistant>) {
|
||||||
super._updateHass(obj);
|
super._updateHass(obj);
|
||||||
for (const [key, value] of Object.entries(obj)) {
|
for (const [key, value] of Object.entries(obj)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user