mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-01 05:27:46 +00:00
When no image occurs mark the image as undefined
This commit is contained in:
parent
da1dd45169
commit
be9ec50e3a
@ -69,6 +69,8 @@ export class HuiMediaControlCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
const stateObj = this.hass.states[this._config.entity] as MediaEntity;
|
||||
|
||||
console.log(stateObj);
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning
|
||||
@ -216,6 +218,7 @@ export class HuiMediaControlCard extends LitElement implements LovelaceCard {
|
||||
.entity_picture;
|
||||
|
||||
if (!newImage || newImage === oldImage) {
|
||||
this._image = newImage;
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user