Fix volume slider of assumed_state media player in entity row (#14931)

This commit is contained in:
Artem Draft 2023-01-23 23:19:11 +03:00 committed by GitHub
parent e242fbe148
commit 38562a42d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -163,7 +163,9 @@ class HuiMediaPlayerEntityRow extends LitElement implements LovelaceRow {
></ha-icon-button>
`
: ""}
${assumedState && supportsFeature(stateObj, SUPPORT_STOP)
${assumedState &&
supportsFeature(stateObj, SUPPORT_STOP) &&
!supportsFeature(stateObj, SUPPORT_VOLUME_SET)
? html`
<ha-icon-button
.path=${mdiStop}
@ -172,7 +174,8 @@ class HuiMediaPlayerEntityRow extends LitElement implements LovelaceRow {
></ha-icon-button>
`
: ""}
${(entityState === "playing" || assumedState) &&
${(entityState === "playing" ||
(assumedState && !supportsFeature(stateObj, SUPPORT_VOLUME_SET))) &&
supportsFeature(stateObj, SUPPORT_NEXT_TRACK)
? html`
<ha-icon-button