Info
At some point recently (I don’t know exactly when, but the past month or two?) A ton of my automations stopped working. I’ve looked into which ones, and the common thread they all have is a Media player: Pause, or Media player: Stop action. Made a quick test automation:
Which fails to run. This only dies if there is no media playing on the device when the call is made. This is happening on Google Home Devices.
A huge number of my automatons have calls like these to ensure that these is no background noise going on when certain actions are taken, or to ensure a quiet state in a room.
I have tested, and know that I can go into each automation, and add a test to see if the device is playing before sending the stop signal. However, that will require a huge amount of work to go in and update every automation.
Question
Is there a way to have all of my automations continue to run (skipping to the next step) if they hit an error, rather than stopping when they encounter an error like this?
Errors & Logs
Error:
“Failed to call service media_player/media_play. Failed to execute play.”
Log 1:
Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/connection.py:300
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 06:58:27 (1 occurrences)
Last logged: 06:58:27[546979242688] Error handling message: CastMediaPlayerEntity.media_pause Failed: Failed to execute pause. (home_assistant_error) cwhiii from fe80::c57:da32:c744:6bd7 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:125.0) Gecko/20100101 Firefox/125.0)
Log 2:
Logger: homeassistant.helpers.script.websocket_api_script
Source: helpers/script.py:1805
First occurred: 06:58:27 (1 occurrences)
Last logged: 06:58:27websocket_api script: Error executing script. Error for call_service at pos 1: CastMediaPlayerEntity.media_pause Failed: Failed to execute pause.
Log 3:
Logger: pychromecast.controllers
Source: components/cast/media_player.py:568
First occurred: 06:58:27 (1 occurrences)
Last logged: 06:58:27PAUSE command requested but no session is active.