Skip to content

Commit

Permalink
fix: set online if getting mqtt messages (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdnninja authored Oct 17, 2024
1 parent e677fa5 commit 756db09
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions yoto_api/YotoMQTTClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ def _parse_status_message(self, message, player):
player.last_updated_at = datetime.datetime.now(pytz.utc)

def _parse_events_message(self, message, player):
if player.online is False:
player.online = True
player.repeat_all = get_child_value(message, "repeatAll") or player.repeat_all
player.volume = get_child_value(message, "volume") or player.volume
player.volume_max = get_child_value(message, "volumeMax") or player.volume_max
Expand Down

0 comments on commit 756db09

Please sign in to comment.