mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-09 02:49:51 +00:00
Use overrideIcon via data binding (#2078)
This commit is contained in:
@@ -44,7 +44,7 @@ class StateBadge extends PolymerElement {
|
||||
id="icon"
|
||||
data-domain$="[[_computeDomain(stateObj)]]"
|
||||
data-state$="[[stateObj.state]]"
|
||||
icon="[[_computeIcon(stateObj)]]"
|
||||
icon="[[_computeIcon(stateObj, overrideIcon)]]"
|
||||
></ha-icon>
|
||||
`;
|
||||
}
|
||||
@@ -63,8 +63,8 @@ class StateBadge extends PolymerElement {
|
||||
return computeStateDomain(stateObj);
|
||||
}
|
||||
|
||||
_computeIcon(stateObj) {
|
||||
return this.overrideIcon || stateIcon(stateObj);
|
||||
_computeIcon(stateObj, overrideIcon) {
|
||||
return overrideIcon || stateIcon(stateObj);
|
||||
}
|
||||
|
||||
_updateIconAppearance(newVal) {
|
||||
|
||||
Reference in New Issue
Block a user