Skip to content

Commit

Permalink
fix: format before sending time
Browse files Browse the repository at this point in the history
  • Loading branch information
cdnninja committed May 27, 2024
1 parent afcd6bd commit 017cbce
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 @@ -206,15 +206,15 @@ def set_player_config(self, token: Token, player_id: str, config: YotoPlayerConf
url = self.BASE_URL + "/device-v2/" + player_id + "/config"
config_payload = {}
if config.day_mode_time:
config_payload["dayTime"] = config.day_mode_time
config_payload["dayTime"] = config.day_mode_time.strftime('%H:%M')
if config.day_display_brightness:
config_payload["dayDisplayBrightness"] = config.day_display_brightness
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
if config.night_mode_time:
config_payload["nightTime"] = 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:
Expand Down

0 comments on commit 017cbce

Please sign in to comment.