mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Revert "Adds throttler to config pages for state entity updates (#21646)"
This reverts commit 00eb820e368125fa4611e19816ecd2b7908187c9.
This commit is contained in:
parent
2a18706a13
commit
6d84523456
@ -51,7 +51,6 @@ import { SubscribeMixin } from "../../mixins/subscribe-mixin";
|
|||||||
import { HomeAssistant, Route } from "../../types";
|
import { HomeAssistant, Route } from "../../types";
|
||||||
import { subscribeLabelRegistry } from "../../data/label_registry";
|
import { subscribeLabelRegistry } from "../../data/label_registry";
|
||||||
import { subscribeFloorRegistry } from "../../data/floor_registry";
|
import { subscribeFloorRegistry } from "../../data/floor_registry";
|
||||||
import { throttle } from "../../common/util/throttle";
|
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
// for fire event
|
// for fire event
|
||||||
@ -396,10 +395,6 @@ class HaPanelConfig extends SubscribeMixin(HassRouterPage) {
|
|||||||
initialValue: [],
|
initialValue: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
private _hassThrottler = throttle((el, hass) => {
|
|
||||||
el.hass = hass;
|
|
||||||
}, 1000);
|
|
||||||
|
|
||||||
public hassSubscribe(): UnsubscribeFunc[] {
|
public hassSubscribe(): UnsubscribeFunc[] {
|
||||||
return [
|
return [
|
||||||
subscribeEntityRegistry(this.hass.connection!, (entities) => {
|
subscribeEntityRegistry(this.hass.connection!, (entities) => {
|
||||||
@ -646,11 +641,7 @@ class HaPanelConfig extends SubscribeMixin(HassRouterPage) {
|
|||||||
this.hass.dockedSidebar === "docked" ? this._wideSidebar : this._wide;
|
this.hass.dockedSidebar === "docked" ? this._wideSidebar : this._wide;
|
||||||
|
|
||||||
el.route = this.routeTail;
|
el.route = this.routeTail;
|
||||||
if (el.hass !== undefined) {
|
el.hass = this.hass;
|
||||||
this._hassThrottler(el, this.hass);
|
|
||||||
} else {
|
|
||||||
el.hass = this.hass;
|
|
||||||
}
|
|
||||||
el.showAdvanced = Boolean(this.hass.userData?.showAdvanced);
|
el.showAdvanced = Boolean(this.hass.userData?.showAdvanced);
|
||||||
el.isWide = isWide;
|
el.isWide = isWide;
|
||||||
el.narrow = this.narrow;
|
el.narrow = this.narrow;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user