mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-01 13:37:47 +00:00
Plant add name (#2130)
This commit is contained in:
parent
ffc7f9706d
commit
8757dbb664
@ -103,6 +103,7 @@ class HaPlantCard extends EventsMixin(PolymerElement) {
|
||||
return {
|
||||
hass: Object,
|
||||
stateObj: Object,
|
||||
config: Object,
|
||||
};
|
||||
}
|
||||
|
||||
@ -118,7 +119,7 @@ class HaPlantCard extends EventsMixin(PolymerElement) {
|
||||
}
|
||||
|
||||
computeTitle(stateObj) {
|
||||
return computeStateName(stateObj);
|
||||
return this.config.name || computeStateName(stateObj);
|
||||
}
|
||||
|
||||
computeAttributes(data) {
|
||||
|
@ -34,6 +34,7 @@ export default class LegacyWrapperCard extends HTMLElement {
|
||||
this._ensureElement(this._tag);
|
||||
this.lastChild.hass = hass;
|
||||
this.lastChild.stateObj = hass.states[entityId];
|
||||
this.lastChild.config = this._config;
|
||||
} else {
|
||||
this._ensureElement("HUI-ERROR-CARD");
|
||||
this.lastChild.setConfig(
|
||||
|
Loading…
x
Reference in New Issue
Block a user