Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/panels/config/entities/entity-registry-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box
import type { PolymerChangedEvent } from "../../../polymer-types";
import { haStyle } from "../../../resources/styles";
import type { HomeAssistant } from "../../../types";
import { domainIcon } from "../../../common/entity/domain_icon";

@customElement("entity-registry-settings")
export class EntityRegistrySettings extends LitElement {
Expand Down Expand Up @@ -93,7 +94,11 @@ export class EntityRegistrySettings extends LitElement {
.value=${this._icon}
@value-changed=${this._iconChanged}
.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}
.errorMessage=${this.hass.localize(
"ui.dialogs.entity_registry.editor.icon_error"
Expand Down
4 changes: 2 additions & 2 deletions src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
"faq": "documentation",
"editor": {
"name": "Name Override",
"icon": "Icon Override",
"name": "Name",
"icon": "Icon",
"icon_error": "Icons should be in the format 'prefix:iconname', e.g. 'mdi:home'",
"entity_id": "Entity ID",
"unavailable": "This entity is not currently available.",
Expand Down