mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-22 16:56:35 +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() {
|
||||
super.connectedCallback();
|
||||
this._unsubAreas = subscribeAreaRegistry(this.hass, (areas) => {
|
||||
this._unsubAreas = subscribeAreaRegistry(this.hass.connection, (areas) => {
|
||||
this._areas = areas;
|
||||
});
|
||||
this._unsubDevices = subscribeDeviceRegistry(this.hass, (devices) => {
|
||||
this.devices = devices;
|
||||
this.device = devices.find((device) => device.id === this.device.id);
|
||||
});
|
||||
this._unsubDevices = subscribeDeviceRegistry(
|
||||
this.hass.connection,
|
||||
(devices) => {
|
||||
this.devices = devices;
|
||||
this.device = devices.find((device) => device.id === this.device.id);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
disconnectedCallback() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user