mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-29 04:06:35 +00:00
Use overrideIcon via data binding (#2078)
This commit is contained in:
parent
d24bc3c07c
commit
14409ff5b7
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user