Functionality to support saving and restoring the current Sonos state.
This is useful for scenarios such as when you want to switch to radio and then back again to what was playing previously.
A snapshot of the current state.
This does not change anything to do with the configuration such as which group the speaker is in, just settings that impact what is playing, or how it is played.
List of sources that may be playing using root of media_uri:
x-rincon-queue: playing from Queue
x-sonosapi-stream: playing a stream (eg radio)
x-file-cifs: playing file
x-rincon: slave zone (only change volume etc. rest from coordinator)
It is strongly advised that you do not snapshot the queue unless you really need to as it takes a very long time to restore large queues as it is done one track at a time.
Record and store the current state of a device.
Trueif the device is a coordinator,
Falseotherwise. Useful for determining whether playing an alert on a device will ungroup it.
Return type: bool
Restore the state of a device to that which was previously saved.
For coordinator devices restore everything. For slave devices only restore volume etc., not transport info (transport info comes from the slave’s coordinator).
Parameters: fade (bool) – Whether volume should be faded up on restore.