mirror of
https://github.com/home-assistant/frontend
synced 2024-09-30 15:52:53 +02:00
Show icon preview when changing device class (#14472)
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
aeeacc6cad
commit
c0240eed67
@ -349,7 +349,13 @@ export class EntityRegistrySettings extends SubscribeMixin(LitElement) {
|
|||||||
.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 || stateObj?.attributes.icon}
|
.placeholder=${this.entry.original_icon || stateObj?.attributes.icon}
|
||||||
.fallbackPath=${!this._icon && !stateObj?.attributes.icon && stateObj
|
.fallbackPath=${!this._icon && !stateObj?.attributes.icon && stateObj
|
||||||
? domainIcon(computeDomain(stateObj.entity_id), stateObj)
|
? domainIcon(computeDomain(stateObj.entity_id), {
|
||||||
|
...stateObj,
|
||||||
|
attributes: {
|
||||||
|
...stateObj.attributes,
|
||||||
|
device_class: this._deviceClass,
|
||||||
|
},
|
||||||
|
})
|
||||||
: undefined}
|
: undefined}
|
||||||
.disabled=${this._submitting}
|
.disabled=${this._submitting}
|
||||||
></ha-icon-picker>
|
></ha-icon-picker>
|
||||||
|
Loading…
Reference in New Issue
Block a user