I want to store only the volume level from 3 mediaplayers to be able to restore them.
The way I tried to do this is with ‘scenes on the fly’ in an automation but somehow I’m struggling with the template.
This template gives me the right value, so that seems OK:
I was already thinking of a different approach instead of using an on the fly scene by storing the value somehow.
So apart from this being solved, I have learned something new!
The reason your automation affected the current playlist is because it employs snapshot_entities which stores many media_player attributes which are later restored.
It’s possible to use a scene to restore the volume level (a separate helper is not needed).
I used the following to temporarily change a media_player’s volume level without affecting what it’s currently playing after the scene is restored. Note that the scene.create service call doesn’t employ snapshot_entities. The inclusion of state is mandatory otherwise an error will appear in the Log when the automation executes.