mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-15 13:26:34 +00:00
Use variable
This commit is contained in:
parent
6d7df18e82
commit
e8201f7848
@ -10,7 +10,7 @@ import "../../../../components/ha-control-button";
|
|||||||
import "../../../../components/ha-control-button-group";
|
import "../../../../components/ha-control-button-group";
|
||||||
import "../../../../components/ha-domain-icon";
|
import "../../../../components/ha-domain-icon";
|
||||||
import { isFullyClosed, isFullyOpen } from "../../../../data/cover";
|
import { isFullyClosed, isFullyOpen } from "../../../../data/cover";
|
||||||
import { UNAVAILABLE } from "../../../../data/entity";
|
import { OFF, ON, UNAVAILABLE } from "../../../../data/entity";
|
||||||
import { forwardHaptic } from "../../../../data/haptics";
|
import { forwardHaptic } from "../../../../data/haptics";
|
||||||
import type { LovelaceSectionConfig } from "../../../../data/lovelace/config/section";
|
import type { LovelaceSectionConfig } from "../../../../data/lovelace/config/section";
|
||||||
import type { TileCardConfig } from "../../../../panels/lovelace/cards/types";
|
import type { TileCardConfig } from "../../../../panels/lovelace/cards/types";
|
||||||
@ -79,12 +79,12 @@ class HaMoreInfoViewToggleGroup extends LitElement {
|
|||||||
const isAllOn = availableEntities.every((entity) =>
|
const isAllOn = availableEntities.every((entity) =>
|
||||||
computeDomain(entity.entity_id) === "cover"
|
computeDomain(entity.entity_id) === "cover"
|
||||||
? isFullyOpen(entity)
|
? isFullyOpen(entity)
|
||||||
: entity.state === "on"
|
: entity.state === ON
|
||||||
);
|
);
|
||||||
const isAllOff = availableEntities.every((entity) =>
|
const isAllOff = availableEntities.every((entity) =>
|
||||||
computeDomain(entity.entity_id) === "cover"
|
computeDomain(entity.entity_id) === "cover"
|
||||||
? isFullyClosed(entity)
|
? isFullyClosed(entity)
|
||||||
: entity.state === "off"
|
: entity.state === OFF
|
||||||
);
|
);
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user