Skip to content

Commit

Permalink
Same for valve
Browse files Browse the repository at this point in the history
  • Loading branch information
piitaya committed Oct 28, 2024
1 parent a2c0ab0 commit fe130b9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/dialogs/more-info/controls/more-info-valve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,11 @@ class MoreInfoValve extends LitElement {
supportsFeature(this.stateObj, ValveEntityFeature.CLOSE) ||
supportsFeature(this.stateObj, ValveEntityFeature.STOP);

const supportsOpenCloseWithoutStop =
const supportsOpenCloseOnly =
supportsFeature(this.stateObj, ValveEntityFeature.OPEN) &&
supportsFeature(this.stateObj, ValveEntityFeature.CLOSE) &&
!supportsFeature(this.stateObj, ValveEntityFeature.STOP);
!supportsFeature(this.stateObj, ValveEntityFeature.STOP) &&
!supportsFeature(this.stateObj, ValveEntityFeature.SET_POSITION);

return html`
<ha-more-info-state-header
Expand All @@ -113,7 +114,7 @@ class MoreInfoValve extends LitElement {
${
this._mode === "button"
? html`
${supportsOpenCloseWithoutStop
${supportsOpenCloseOnly
? html`
<ha-state-control-valve-toggle
.stateObj=${this.stateObj}
Expand Down

0 comments on commit fe130b9

Please sign in to comment.