mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 16:26:43 +00:00
Entity registry settings: Remove "Override" string + use domain icon as fallback (#7320)
This commit is contained in:
parent
6e130cc020
commit
713e0579f8
@ -27,6 +27,7 @@ import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box
|
|||||||
import type { PolymerChangedEvent } from "../../../polymer-types";
|
import type { PolymerChangedEvent } from "../../../polymer-types";
|
||||||
import { haStyle } from "../../../resources/styles";
|
import { haStyle } from "../../../resources/styles";
|
||||||
import type { HomeAssistant } from "../../../types";
|
import type { HomeAssistant } from "../../../types";
|
||||||
|
import { domainIcon } from "../../../common/entity/domain_icon";
|
||||||
|
|
||||||
@customElement("entity-registry-settings")
|
@customElement("entity-registry-settings")
|
||||||
export class EntityRegistrySettings extends LitElement {
|
export class EntityRegistrySettings extends LitElement {
|
||||||
@ -93,7 +94,11 @@ export class EntityRegistrySettings extends LitElement {
|
|||||||
.value=${this._icon}
|
.value=${this._icon}
|
||||||
@value-changed=${this._iconChanged}
|
@value-changed=${this._iconChanged}
|
||||||
.label=${this.hass.localize("ui.dialogs.entity_registry.editor.icon")}
|
.label=${this.hass.localize("ui.dialogs.entity_registry.editor.icon")}
|
||||||
.placeholder=${this.entry.original_icon}
|
.placeholder=${this.entry.original_icon ||
|
||||||
|
domainIcon(
|
||||||
|
computeDomain(this.entry.entity_id),
|
||||||
|
this.hass.states[this.entry.entity_id]
|
||||||
|
)}
|
||||||
.disabled=${this._submitting}
|
.disabled=${this._submitting}
|
||||||
.errorMessage=${this.hass.localize(
|
.errorMessage=${this.hass.localize(
|
||||||
"ui.dialogs.entity_registry.editor.icon_error"
|
"ui.dialogs.entity_registry.editor.icon_error"
|
||||||
|
@ -551,8 +551,8 @@
|
|||||||
"no_unique_id": "This entity does not have a unique ID, therefore its settings cannot be managed from the UI. See the {faq_link} for more detail.",
|
"no_unique_id": "This entity does not have a unique ID, therefore its settings cannot be managed from the UI. See the {faq_link} for more detail.",
|
||||||
"faq": "documentation",
|
"faq": "documentation",
|
||||||
"editor": {
|
"editor": {
|
||||||
"name": "Name Override",
|
"name": "Name",
|
||||||
"icon": "Icon Override",
|
"icon": "Icon",
|
||||||
"icon_error": "Icons should be in the format 'prefix:iconname', e.g. 'mdi:home'",
|
"icon_error": "Icons should be in the format 'prefix:iconname', e.g. 'mdi:home'",
|
||||||
"entity_id": "Entity ID",
|
"entity_id": "Entity ID",
|
||||||
"unavailable": "This entity is not currently available.",
|
"unavailable": "This entity is not currently available.",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user