Skip to content

Commit

Permalink
feature: make it possible to hide volume cogwheel
Browse files Browse the repository at this point in the history
  • Loading branch information
punxaphil committed Mar 10, 2024
1 parent 342519c commit 9dfd213
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/editor/advanced-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion src/sections/volumes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Volumes extends LitElement {
.path=${mdiVolumePlus}
></ha-icon-button>
<ha-icon-button
hide=${updateMembers || nothing}
hide=${updateMembers || this.config.hideVolumeCogwheel || nothing}
@click=${() => this.toggleShowSwitches(player)}
.path=${mdiCog}
show-switches=${this.showSwitches[player.id] || nothing}
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export interface CardConfig extends LovelaceCardConfig {
mediaBrowserTitle?: string;
adjustVolumeRelativeToMainPlayer?: boolean;
skipApplyButtonWhenGrouping?: boolean;
hideVolumeCogwheel?: boolean;
}

export interface MediaArtworkOverride {
Expand Down

0 comments on commit 9dfd213

Please sign in to comment.