diff --git a/src/panels/lovelace/dialogs/hui-dialog-group-toggle.ts b/src/panels/lovelace/dialogs/hui-dialog-group-toggle.ts
index 25113cce86..bb378d022b 100644
--- a/src/panels/lovelace/dialogs/hui-dialog-group-toggle.ts
+++ b/src/panels/lovelace/dialogs/hui-dialog-group-toggle.ts
@@ -22,6 +22,7 @@ import type { TileCardConfig } from "../cards/types";
import "../sections/hui-section";
import type { GroupToggleDialogParams } from "./show-group-toggle-dialog";
import { isFullyClosed, isFullyOpen } from "../../../data/cover";
+import { UNAVAILABLE } from "../../../data/entity";
@customElement("hui-dialog-group-toggle")
class HuiGroupToggleDialog extends LitElement {
@@ -83,11 +84,13 @@ class HuiGroupToggleDialog extends LitElement {
const isGroup = this._params.entityIds.length > 1;
const isAllOn = entities.every((entity) =>
+ entity.state === UNAVAILABLE ||
computeDomain(entity.entity_id) === "cover"
? isFullyOpen(entity)
: entity.state === "on"
);
const isAllOff = entities.every((entity) =>
+ entity.state === UNAVAILABLE ||
computeDomain(entity.entity_id) === "cover"
? isFullyClosed(entity)
: entity.state === "off"
@@ -108,10 +111,12 @@ class HuiGroupToggleDialog extends LitElement {
.label=${this.hass.localize("ui.common.close")}
.path=${mdiClose}
>
- ${this._params.title}
- ${this._params.subtitle
- ? html`${this._params.subtitle}`
- : nothing}
+
+ ${this._params.subtitle
+ ? html`${this._params.subtitle}`
+ : nothing}
+ ${this._params.title}