Skip to content

Commit

Permalink
Fix state reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
definitio committed Aug 21, 2020
1 parent 7c7358c commit 97e2785
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/sox/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def play_media(self, media_type, media_id, **kwargs):
sock = socket(AF_INET, SOCK_STREAM)
sock.connect((self._host, self._port))
self._play = True
self.schedule_update_ha_state()
sock.sendall("{};".format(media_id).encode())
sock.close()
sleep(10)
Expand Down

0 comments on commit 97e2785

Please sign in to comment.