mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 03:36:44 +00:00
Scenes: Fix entity picked from device doesn't add device (#6343)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
parent
58ffc2c6ca
commit
e71dd7409e
@ -532,6 +532,18 @@ export class HaSceneEditor extends SubscribeMixin(LitElement) {
|
||||
}
|
||||
this._entities = [...this._entities, entityId];
|
||||
this._storeState(entityId);
|
||||
|
||||
const entityRegistry = this._entityRegistryEntries.find(
|
||||
(entityReg) => entityReg.entity_id === entityId
|
||||
);
|
||||
|
||||
if (
|
||||
entityRegistry?.device_id &&
|
||||
!this._devices.includes(entityRegistry.device_id)
|
||||
) {
|
||||
this._devices = [...this._devices, entityRegistry.device_id];
|
||||
}
|
||||
|
||||
this._dirty = true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user