Skip to content

Commit

Permalink
fix: allow zero max volume
Browse files Browse the repository at this point in the history
  • Loading branch information
cdnninja authored Nov 15, 2024
1 parent 3466d11 commit 2b952be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yoto_api/YotoAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def set_player_config(self, token: Token, player_id: str, config: YotoPlayerConf
config_payload["dayDisplayBrightness"] = str(config.day_display_brightness)
if config.day_ambient_colour:
config_payload["ambientColour"] = config.day_ambient_colour
if config.day_max_volume_limit:
if config.day_max_volume_limit is not None:
config_payload["maxVolumeLimit"] = str(config.day_max_volume_limit)
if config.night_mode_time:
config_payload["nightTime"] = config.night_mode_time.strftime("%H:%M")
Expand All @@ -325,7 +325,7 @@ def set_player_config(self, token: Token, player_id: str, config: YotoPlayerConf
)
if config.night_ambient_colour:
config_payload["nightAmbientColour"] = config.night_ambient_colour
if config.night_max_volume_limit:
if config.night_max_volume_limit is not None:
config_payload["nightMaxVolumeLimit"] = str(config.night_max_volume_limit)
if config.alarms:
alarm_payload = []
Expand Down

0 comments on commit 2b952be

Please sign in to comment.