mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix group more-info to show the state of the group entity (#17052)
This commit is contained in:
parent
87aad75cc7
commit
3111c29049
@ -46,7 +46,8 @@ class MoreInfoGroup extends LitElement {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const baseStateObj = states.find((s) => s.state === "on") || states[0];
|
const baseStateObj =
|
||||||
|
states.find((s) => s.state === this.stateObj!.state) || states[0];
|
||||||
|
|
||||||
const groupDomain = computeGroupDomain(this.stateObj);
|
const groupDomain = computeGroupDomain(this.stateObj);
|
||||||
|
|
||||||
@ -56,6 +57,8 @@ class MoreInfoGroup extends LitElement {
|
|||||||
this._groupDomainStateObj = {
|
this._groupDomainStateObj = {
|
||||||
...baseStateObj,
|
...baseStateObj,
|
||||||
entity_id: this.stateObj.entity_id,
|
entity_id: this.stateObj.entity_id,
|
||||||
|
last_updated: this.stateObj.last_updated,
|
||||||
|
last_changed: this.stateObj.last_changed,
|
||||||
attributes: {
|
attributes: {
|
||||||
...baseStateObj.attributes,
|
...baseStateObj.attributes,
|
||||||
friendly_name: this.stateObj.attributes.friendly_name,
|
friendly_name: this.stateObj.attributes.friendly_name,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user