From 9dfd213724ab5339a4a683b02a4dcadfe6fb0c42 Mon Sep 17 00:00:00 2001 From: Johan Frick Date: Sun, 10 Mar 2024 19:56:21 +0100 Subject: [PATCH] feature: make it possible to hide volume cogwheel --- README.md | 5 +++-- src/editor/advanced-editor.ts | 4 ++++ src/sections/volumes.ts | 2 +- src/types.ts | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8a18ec06..0c990312 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ adjustVolumeRelativeToMainPlayer: true # default is false, which means all playe groupsTitle: '' hideGroupCurrentTrack: true # default is false, which means song/track info for groups will be shown -# groupings specific +# grouping specific groupingTitle: '' predefinedGroups: # defaults to empty - name: Inside @@ -118,6 +118,7 @@ predefinedGroups: # defaults to empty excludeItemsInEntitiesList: true # Invert entities selection, so that all players will be grouped except those in the entities list entities: - media_player.tv +skipApplyButtonWhenGrouping: true # default is false. Will skip the apply button when grouping. # player specific showVolumeUpAndDownButtons: true # default is false, shows buttons for increasing and decreasing volume @@ -167,7 +168,7 @@ replaceHttpWithHttpsForThumbnails: true # default is false. Use this if you wan mediaBrowserTitle: My favorites # default is 'All favorites'. Use this to change the title for the media browser/favorites section. # volumes specific -skipApplyButtonWhenGrouping: true # default is false. Will skip the apply button when grouping. +hideVolumeCogwheel: true # default is false. Will hide the cogwheel for the volumes section. ``` ## Using individual section cards diff --git a/src/editor/advanced-editor.ts b/src/editor/advanced-editor.ts index 164d4c24..59d3089a 100644 --- a/src/editor/advanced-editor.ts +++ b/src/editor/advanced-editor.ts @@ -56,6 +56,10 @@ export const ADVANCED_SCHEMA = [ name: 'skipApplyButtonWhenGrouping', selector: { boolean: {} }, }, + { + name: 'hideVolumeCogwheel', + selector: { boolean: {} }, + }, { type: 'string', help: 'Override default fallback artwork image if artwork is missing for the currently selected media', diff --git a/src/sections/volumes.ts b/src/sections/volumes.ts index 94c91a25..b67870f2 100755 --- a/src/sections/volumes.ts +++ b/src/sections/volumes.ts @@ -58,7 +58,7 @@ class Volumes extends LitElement { .path=${mdiVolumePlus} > this.toggleShowSwitches(player)} .path=${mdiCog} show-switches=${this.showSwitches[player.id] || nothing} diff --git a/src/types.ts b/src/types.ts index b13f3ed7..f4b6a745 100644 --- a/src/types.ts +++ b/src/types.ts @@ -55,6 +55,7 @@ export interface CardConfig extends LovelaceCardConfig { mediaBrowserTitle?: string; adjustVolumeRelativeToMainPlayer?: boolean; skipApplyButtonWhenGrouping?: boolean; + hideVolumeCogwheel?: boolean; } export interface MediaArtworkOverride {