Media Player set to Idle instead of playing when activating scene

I’m running an automation that is executed upon me leaving my home - it basically creates a scene, snapshotting a list of light entities, then turns them off.
When coming back home another automation is triggered which activates the same scene and all the lights come back to exactly how I left them. So far so good.
I’d like to add a media_player entity to the same setup but I’m having trouble: I’m including it in the list of entities upon scene creation, then if the state is Playing, I call media_player.media_play_pause.
When restoring the scene however the state is of the media_Player is not set back to Playing but to Idle instead.
Any ideas how to fix this?

It depends on the media player. Not many of them support restoring playback. The only one I know of is Sonos and you have to use a dedicated service for that.

https://www.home-assistant.io/integrations/sonos/#service-sonosrestore

So no, scenes are not capable of restoring playback.

thanks, the media player is owntone/forked_daapd using the built-in HA integration.
I’m not trying to restore playback, I’m calling play_pause.
In fact, if I call the same service manually (using Dev Tools) after the automation sets the state to Idle, it resumes playing correctly.
I suspect that I could go around this issue - i.e. when running the ‘leaving’ automation I could flip a binary sensor if the state is ‘Playing’ and then check for this sensor’s value to see if I need to resume playing instead of relying to the scene activation.

I confirm the winery sensor approach is working. A workaround, not a solution, but anyway, it works.