mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
Using entity_picture_local for entity card and badge (#6489)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
3aa376e912
commit
07fceeab5a
@ -81,7 +81,7 @@ export class HaStateLabelBadge extends LitElement {
|
|||||||
? ""
|
? ""
|
||||||
: this.image
|
: this.image
|
||||||
? this.image
|
? this.image
|
||||||
: state.attributes.entity_picture}"
|
: state.attributes.entity_picture_local || state.attributes.entity_picture}"
|
||||||
.label="${this._computeLabel(domain, state, this._timerTimeRemaining)}"
|
.label="${this._computeLabel(domain, state, this._timerTimeRemaining)}"
|
||||||
.description="${this.name ? this.name : computeStateName(state)}"
|
.description="${this.name ? this.name : computeStateName(state)}"
|
||||||
></ha-label-badge>
|
></ha-label-badge>
|
||||||
|
@ -73,10 +73,10 @@ export class StateBadge extends LitElement {
|
|||||||
if (stateObj) {
|
if (stateObj) {
|
||||||
// hide icon if we have entity picture
|
// hide icon if we have entity picture
|
||||||
if (
|
if (
|
||||||
(stateObj.attributes.entity_picture && !this.overrideIcon) ||
|
((stateObj.attributes.entity_picture_local || stateObj.attributes.entity_picture) && !this.overrideIcon) ||
|
||||||
this.overrideImage
|
this.overrideImage
|
||||||
) {
|
) {
|
||||||
let imageUrl = this.overrideImage || stateObj.attributes.entity_picture;
|
let imageUrl = this.overrideImage || stateObj.attributes.entity_picture_local || stateObj.attributes.entity_picture;
|
||||||
if (this.hass) {
|
if (this.hass) {
|
||||||
imageUrl = this.hass.hassUrl(imageUrl);
|
imageUrl = this.hass.hassUrl(imageUrl);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user