mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +00:00
Pass connection instead of hass (#3228)
This commit is contained in:
parent
ab157fdbff
commit
bdacd05fab
@ -169,13 +169,16 @@ class HaDeviceCard extends EventsMixin(LocalizeMixin(PolymerElement)) {
|
|||||||
|
|
||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
super.connectedCallback();
|
super.connectedCallback();
|
||||||
this._unsubAreas = subscribeAreaRegistry(this.hass, (areas) => {
|
this._unsubAreas = subscribeAreaRegistry(this.hass.connection, (areas) => {
|
||||||
this._areas = areas;
|
this._areas = areas;
|
||||||
});
|
});
|
||||||
this._unsubDevices = subscribeDeviceRegistry(this.hass, (devices) => {
|
this._unsubDevices = subscribeDeviceRegistry(
|
||||||
|
this.hass.connection,
|
||||||
|
(devices) => {
|
||||||
this.devices = devices;
|
this.devices = devices;
|
||||||
this.device = devices.find((device) => device.id === this.device.id);
|
this.device = devices.find((device) => device.id === this.device.id);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnectedCallback() {
|
disconnectedCallback() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user