From 3111c29049f4161fa9603590cd1eb261b1eae02a Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Tue, 27 Jun 2023 07:54:18 -0700 Subject: [PATCH] Fix group more-info to show the state of the group entity (#17052) --- src/dialogs/more-info/controls/more-info-group.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dialogs/more-info/controls/more-info-group.ts b/src/dialogs/more-info/controls/more-info-group.ts index 0f5131c395..8006228e16 100644 --- a/src/dialogs/more-info/controls/more-info-group.ts +++ b/src/dialogs/more-info/controls/more-info-group.ts @@ -46,7 +46,8 @@ class MoreInfoGroup extends LitElement { 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); @@ -56,6 +57,8 @@ class MoreInfoGroup extends LitElement { this._groupDomainStateObj = { ...baseStateObj, entity_id: this.stateObj.entity_id, + last_updated: this.stateObj.last_updated, + last_changed: this.stateObj.last_changed, attributes: { ...baseStateObj.attributes, friendly_name: this.stateObj.attributes.friendly_name,