From 3180747a0a241b20ac4a61b360320d4c60c6226a Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Mon, 28 Oct 2024 16:33:12 +0100 Subject: [PATCH] Show buttons in cover and valve more info if it supports position (#22569) * Show buttons in cover more info if the cover supports position * Same for valve * Refactor --- src/dialogs/more-info/controls/more-info-cover.ts | 9 +++++---- src/dialogs/more-info/controls/more-info-valve.ts | 7 ++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/dialogs/more-info/controls/more-info-cover.ts b/src/dialogs/more-info/controls/more-info-cover.ts index a352002e4adb..bf96995fcfe8 100644 --- a/src/dialogs/more-info/controls/more-info-cover.ts +++ b/src/dialogs/more-info/controls/more-info-cover.ts @@ -93,12 +93,13 @@ class MoreInfoCover extends LitElement { supportsFeature(this.stateObj, CoverEntityFeature.CLOSE_TILT) || supportsFeature(this.stateObj, CoverEntityFeature.STOP_TILT); - const supportsOpenCloseWithoutStop = + const supportsOpenCloseOnly = supportsFeature(this.stateObj, CoverEntityFeature.OPEN) && supportsFeature(this.stateObj, CoverEntityFeature.CLOSE) && !supportsFeature(this.stateObj, CoverEntityFeature.STOP) && - !supportsFeature(this.stateObj, CoverEntityFeature.OPEN_TILT) && - !supportsFeature(this.stateObj, CoverEntityFeature.CLOSE_TILT); + !supportsTilt && + !supportsPosition && + !supportsTiltPosition; return html`