Skip to content

Commit

Permalink
Adds initial-volume option.
Browse files Browse the repository at this point in the history
  • Loading branch information
spoetnik committed Dec 6, 2024
1 parent a1f0d43 commit 518b91a
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spotify/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Example add-on configuration:
log_level: info
name: HomeAssistant
bitrate: 320
initial-volume: 50
username: [email protected]
password: MySpotifyPassword
```
Expand Down Expand Up @@ -74,6 +75,10 @@ however, the add-on consumes more data.

Valid values: `96`, `160` (default) or `320`.

### Option: `initial-volume`

Initial volume in % from 0-100. Default for softvol: 50. For the alsa mixer: the current volume.

### Option: `username`

**IMPORTANT**: _This requires a Spotify Premium account!_
Expand Down
2 changes: 2 additions & 0 deletions spotify/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ init: false
options:
name: Home Assistant
bitrate: 160
initial-volume: 50
schema:
log_level: list(trace|debug|info|notice|warning|error|fatal)?
name: str
bitrate: list(96|160|320)
username: str?
password: password?
initial-volume: int?
3 changes: 3 additions & 0 deletions spotify/rootfs/etc/services.d/spotifyd/run
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ bashio::log.info 'Starting the Spotify daemon...'
# Bitrate
options+=(--bitrate $(bashio::config 'bitrate'))

# Initial Volume
options+=(--initial-volume $(bashio::config 'initial-volume'))

# Device name
name=$(bashio::config 'name')
options+=(--name "${name}")
Expand Down
6 changes: 6 additions & 0 deletions spotify/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ configuration:
description: >-
The bitrate Spotify should use. The higher, the better the sound quality,
however, the add-on consumes more data.
initial-volume:
name: Initial Volume
description: >-
Initial volume in % from 0-100.
Default for softvol: 50.
For the alsa mixer: the current volume.
username:
name: Spotify username
description: >-
Expand Down
6 changes: 6 additions & 0 deletions spotify/translations/hu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ configuration:
description: >-
A Spotify által használt bitráta beállítása. Minél magasabb, annál jobb
minőségű, viszont ez nagyobb adatforgalommal jár.
initial-volume:
name: Initial Volume
description: >-
Kezdeti térfogat %-ban 0-100 között.
A softvol alapértelmezett értéke: 50.
Az alsa keverő esetében: az aktuális térfogat.
username:
name: Spotify felhasználónév
description: >-
Expand Down
6 changes: 6 additions & 0 deletions spotify/translations/it.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ configuration:
description: >-
Il bitrate che Spotify dovrebbe usare. Piú é alto, migliore é la qualitá sonora,
tuttavia, l'add-on consumerá piú banda.
initial-volume:
name: Initial Volume
description: >-
Volume iniziale in % da 0 a 100.
Impostazione predefinita per softvol: 50.
Per il mixer alsa: il volume attuale.
username:
name: Spotify username
description: >-
Expand Down

0 comments on commit 518b91a

Please sign in to comment.