1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-02-15 07:25:54 +00:00

Replace legacy hass icons to mdi icons (#27244)

This commit is contained in:
Paul Bottein
2025-09-29 17:30:20 +02:00
committed by GitHub
parent afdd232e38
commit 0c2a7bfed0
11 changed files with 21 additions and 21 deletions

View File

@@ -75,7 +75,7 @@ export const castDemoEntities: () => Entity[] = () =>
longitude: 4.8903147,
radius: 100,
friendly_name: "Home",
icon: "hass:home",
icon: "mdi:home",
},
},
"input_number.harmonyvolume": {
@@ -88,7 +88,7 @@ export const castDemoEntities: () => Entity[] = () =>
step: 1,
mode: "slider",
friendly_name: "Volume",
icon: "hass:volume-high",
icon: "mdi:volume-high",
},
},
"climate.upstairs": {

View File

@@ -56,7 +56,7 @@ export const castDemoLovelace: () => LovelaceConfig = () => {
type: "weblink",
url: "/lovelace/climate",
name: "Climate controls",
icon: "hass:arrow-right",
icon: "mdi:arrow-right",
},
],
},
@@ -76,7 +76,7 @@ export const castDemoLovelace: () => LovelaceConfig = () => {
type: "weblink",
url: "/lovelace/overview",
name: "Back",
icon: "hass:arrow-left",
icon: "mdi:arrow-left",
},
],
},

View File

@@ -143,7 +143,7 @@ export const demoEntitiesArsaboo: DemoConfig["entities"] = (localize) =>
state: "on",
attributes: {
friendly_name: "Home Automation",
icon: "hass:home-automation",
icon: "mdi:home-automation",
},
},
"input_boolean.tvtime": {

View File

@@ -4,7 +4,7 @@ export const demoLovelaceArsaboo: DemoConfig["lovelace"] = (localize) => ({
title: "Home Assistant",
views: [
{
icon: "hass:home-assistant",
icon: "mdi:home-assistant",
id: "home",
title: "Home",
cards: [

View File

@@ -1236,7 +1236,7 @@ export const demoLovelaceJimpower: DemoConfig["lovelace"] = () => ({
},
],
path: "security",
icon: "hass:shield-home",
icon: "mdi:shield-home",
name: "Security",
background:
'center / cover no-repeat url("/assets/jimpower/background-15.jpg") fixed',

View File

@@ -62,7 +62,7 @@ export class HaColorTempSelector extends LitElement {
"--ha-slider-background": `linear-gradient( to var(--float-end), ${gradient})`,
})}
labeled
icon="hass:thermometer"
icon="mdi:thermometer"
.caption=${this.label || ""}
.min=${min}
.max=${max}

View File

@@ -66,9 +66,9 @@ export const getPanelIcon = (panel: PanelInfo): string | null => {
if (!panel.icon) {
switch (panel.component_name) {
case "profile":
return "hass:account";
return "mdi:account";
case "lovelace":
return "hass:view-dashboard";
return "mdi:view-dashboard";
}
}

View File

@@ -110,7 +110,7 @@ class LightRgbColorPicker extends LitElement {
? html`<ha-labeled-slider
labeled
.caption=${this.hass.localize("ui.card.light.color_brightness")}
icon="hass:brightness-7"
icon="mdi:brightness-7"
min="0"
max="100"
.value=${this._colorBrightnessSliderValue}
@@ -122,7 +122,7 @@ class LightRgbColorPicker extends LitElement {
<ha-labeled-slider
labeled
.caption=${this.hass.localize("ui.card.light.white_value")}
icon="hass:file-word-box"
icon="mdi:file-word-box"
min="0"
max="100"
.name=${"wv"}
@@ -136,7 +136,7 @@ class LightRgbColorPicker extends LitElement {
<ha-labeled-slider
labeled
.caption=${this.hass.localize("ui.card.light.cold_white_value")}
icon="hass:file-word-box-outline"
icon="mdi:file-word-box-outline"
min="0"
max="100"
.name=${"cw"}
@@ -146,7 +146,7 @@ class LightRgbColorPicker extends LitElement {
<ha-labeled-slider
labeled
.caption=${this.hass.localize("ui.card.light.warm_white_value")}
icon="hass:file-word-box"
icon="mdi:file-word-box"
min="0"
max="100"
.name=${"ww"}

View File

@@ -60,28 +60,28 @@ export const demoPanels: Panels = {
// Uncomment when we are ready to stub the history API
// history: {
// component_name: "history",
// icon: "hass:poll-box",
// icon: "mdi:chart-box",
// title: "history",
// config: null,
// url_path: "history",
// },
map: {
component_name: "lovelace",
icon: "hass:tooltip-account",
icon: "mdi:tooltip-account",
title: "map",
config: { mode: "storage" },
url_path: "map",
},
energy: {
component_name: "energy",
icon: "hass:lightning-bolt",
icon: "mdi:lightning-bolt",
title: "energy",
config: null,
url_path: "energy",
},
// config: {
// component_name: "config",
// icon: "hass:cog",
// icon: "mdi:cog",
// title: "config",
// config: null,
// url_path: "config",

View File

@@ -275,7 +275,7 @@ export class HaConfigLovelaceDashboards extends LitElement {
const isDefault = defaultUrlPath === "lovelace";
const result: DataTableItem[] = [
{
icon: "hass:view-dashboard",
icon: "mdi:view-dashboard",
title: this.hass.localize("panel.states"),
default: isDefault,
show_in_sidebar: isDefault,
@@ -288,7 +288,7 @@ export class HaConfigLovelaceDashboards extends LitElement {
];
if (isComponentLoaded(this.hass, "energy")) {
result.push({
icon: "hass:lightning-bolt",
icon: "mdi:lightning-bolt",
title: this.hass.localize(`ui.panel.config.dashboard.energy.main`),
show_in_sidebar: true,
mode: "storage",

View File

@@ -17,7 +17,7 @@ class HuiWeblinkRow extends LitElement implements LovelaceRow {
}
this._config = {
icon: "hass:link",
icon: "mdi:link",
name: config.url,
...config,
};