Fix media player icons not refreshing.

This commit is contained in:
Dermot Duffy
2023-03-04 14:55:08 -08:00
parent 7015cd9566
commit d927585678
+7 -5
View File
@@ -1263,11 +1263,13 @@ class FrigateCard extends LitElement {
this._changeView();
shouldUpdate = true;
} else {
shouldUpdate ||= isHassDifferent(
this._hass,
oldHass,
this._getConfig().view.render_entities || [],
);
shouldUpdate ||= isHassDifferent(this._hass, oldHass, [
...(this._getConfig().view.render_entities ?? []),
// Refresh the card if media player state changes:
// https://github.com/dermotduffy/frigate-hass-card/issues/881
...(this._mediaPlayers ?? []),
]);
}
}
return shouldUpdate;