diff --git a/README.md b/README.md
index f203e562..124ac8b8 100644
--- a/README.md
+++ b/README.md
@@ -151,6 +151,7 @@ entitiesToIgnoreVolumeLevelFor: # default is empty. Use this if you want to igno
- media_player.my_sonos_port_device
artworkMinHeight: 10 # default is 5. Use this to change the minimum height of the artwork in the player section. Unit is in rem.
artworkAsBackground: true # default is false. Will show the artwork as background for the player section.
+playerVolumeOnlyAffectsMainPlayer: true # default is false. Will only affect the main player when changing volume in the player section.
# media browser specific
mediaBrowserItemsPerRow: 1 # default is 4. Use this to show items as list.
diff --git a/src/components/player-controls.ts b/src/components/player-controls.ts
index 43893dfd..767ee863 100755
--- a/src/components/player-controls.ts
+++ b/src/components/player-controls.ts
@@ -38,14 +38,20 @@ class PlayerControls extends LitElement {
${this.config.showAudioInputFormat && until(this.getAudioInputFormat())}
-
+
`,
)}
`;
}
- private volDown = async () => await this.mediaControlService.volumeDown(this.activePlayer);
- private volUp = async () => await this.mediaControlService.volumeUp(this.activePlayer);
+ private volDown = async () =>
+ await this.mediaControlService.volumeDown(this.activePlayer, !this.config.playerVolumeOnlyAffectsMainPlayer);
+ private volUp = async () =>
+ await this.mediaControlService.volumeUp(this.activePlayer, !this.config.playerVolumeOnlyAffectsMainPlayer);
private async getAudioInputFormat() {
const sensors = await this.store.hassService.getRelatedEntities(this.activePlayer, 'sensor');
diff --git a/src/editor/advanced-editor.ts b/src/editor/advanced-editor.ts
index d31d4a14..424dac31 100644
--- a/src/editor/advanced-editor.ts
+++ b/src/editor/advanced-editor.ts
@@ -88,6 +88,10 @@ export const ADVANCED_SCHEMA = [
name: 'artworkAsBackground',
selector: { boolean: {} },
},
+ {
+ name: 'playerVolumeOnlyAffectsMainPlayer',
+ selector: { boolean: {} },
+ },
{
type: 'string',
help: 'Override default fallback artwork image if artwork is missing for the currently selected media',
diff --git a/src/types.ts b/src/types.ts
index 9ba6f6a9..c9ae7a15 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -60,6 +60,7 @@ export interface CardConfig extends LovelaceCardConfig {
dynamicVolumeSliderMax?: number;
artworkMinHeight?: number;
artworkAsBackground?: boolean;
+ playerVolumeOnlyAffectsMainPlayer?: boolean;
}
export interface MediaArtworkOverride {