mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 03:36:44 +00:00
Remove specific icons for area controls card features (#26195)
This commit is contained in:
parent
039ef18d8c
commit
b207528ecf
@ -32,8 +32,6 @@ import type {
|
|||||||
import { AREA_CONTROLS } from "./types";
|
import { AREA_CONTROLS } from "./types";
|
||||||
|
|
||||||
interface AreaControlsButton {
|
interface AreaControlsButton {
|
||||||
offIcon?: string;
|
|
||||||
onIcon?: string;
|
|
||||||
filter: {
|
filter: {
|
||||||
domain: string;
|
domain: string;
|
||||||
device_class?: string;
|
device_class?: string;
|
||||||
@ -49,9 +47,6 @@ const coverButton = (deviceClass: string) => ({
|
|||||||
|
|
||||||
export const AREA_CONTROLS_BUTTONS: Record<AreaControl, AreaControlsButton> = {
|
export const AREA_CONTROLS_BUTTONS: Record<AreaControl, AreaControlsButton> = {
|
||||||
light: {
|
light: {
|
||||||
// Overrides the icons for lights
|
|
||||||
offIcon: "mdi:lightbulb-off",
|
|
||||||
onIcon: "mdi:lightbulb",
|
|
||||||
filter: {
|
filter: {
|
||||||
domain: "light",
|
domain: "light",
|
||||||
},
|
},
|
||||||
@ -258,8 +253,6 @@ class HuiAreaControlsCardFeature
|
|||||||
`ui.card_features.area_controls.${control}.${active ? "off" : "on"}`
|
`ui.card_features.area_controls.${control}.${active ? "off" : "on"}`
|
||||||
);
|
);
|
||||||
|
|
||||||
const icon = active ? button.onIcon : button.offIcon;
|
|
||||||
|
|
||||||
const domain = button.filter.domain;
|
const domain = button.filter.domain;
|
||||||
const deviceClass = button.filter.device_class
|
const deviceClass = button.filter.device_class
|
||||||
? ensureArray(button.filter.device_class)[0]
|
? ensureArray(button.filter.device_class)[0]
|
||||||
@ -282,7 +275,6 @@ class HuiAreaControlsCardFeature
|
|||||||
>
|
>
|
||||||
<ha-domain-icon
|
<ha-domain-icon
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.icon=${icon}
|
|
||||||
.domain=${domain}
|
.domain=${domain}
|
||||||
.deviceClass=${deviceClass}
|
.deviceClass=${deviceClass}
|
||||||
.state=${groupState}
|
.state=${groupState}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user