Skip to content

Commit

Permalink
fix: convert volume to string - yes i know
Browse files Browse the repository at this point in the history
  • Loading branch information
cdnninja committed May 31, 2024
1 parent d7a8544 commit 393c55b
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 @@ -262,15 +262,15 @@ def set_player_config(self, token: Token, player_id: str, config: YotoPlayerConf
if config.day_ambient_colour:
config_payload["ambientColour"] = config.day_ambient_colour
if config.day_max_volume_limit:
config_payload["maxVolumeLimit"] = config.day_max_volume_limit
config_payload["maxVolumeLimit"] = str(config.day_max_volume_limit)
if config.night_mode_time:
config_payload["nightTime"] = config.night_mode_time.strftime("%H:%M")
if config.night_display_brightness:
config_payload["nightDisplayBrightness"] = config.night_display_brightness
if config.night_ambient_colour:
config_payload["nightAmbientColour"] = config.night_ambient_colour
if config.night_max_volume_limit:
config_payload["nightMaxVolumeLimit"] = config.night_max_volume_limit
config_payload["nightMaxVolumeLimit"] = str(config.night_max_volume_limit)
data = {"deviceId": player_id, "config": config_payload}
headers = self._get_authenticated_headers(token)
response = requests.put(url, headers=headers, data=json.dumps(data)).json()
Expand Down

0 comments on commit 393c55b

Please sign in to comment.