Fix Snapcast state after restoring snapshot (#51340)

This commit is contained in:
definitio 2021-06-01 20:07:51 +03:00 committed by GitHub
parent cdd1f6b2f0
commit 6a474e74e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -198,6 +198,7 @@ class SnapcastGroupDevice(MediaPlayerEntity):
async def async_restore(self):
"""Restore the group state."""
await self._group.restore()
self.async_write_ha_state()
class SnapcastClientDevice(MediaPlayerEntity):
@ -326,6 +327,7 @@ class SnapcastClientDevice(MediaPlayerEntity):
async def async_restore(self):
"""Restore the client state."""
await self._client.restore()
self.async_write_ha_state()
async def async_set_latency(self, latency):
"""Set the latency of the client."""