Latest HomePod updates broke set_volume

Traceback (most recent call last):
  File "/Users/server/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/script.py", line 367, in _async_step
    await getattr(self, handler)()
  File "/Users/server/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/script.py", line 570, in _async_call_service_step
    await service_task
  File "/Users/server/homeassistant/lib/python3.9/site-packages/homeassistant/core.py", line 1636, in async_call
    task.result()
  File "/Users/server/homeassistant/lib/python3.9/site-packages/homeassistant/core.py", line 1673, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/Users/server/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/Users/server/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/service.py", line 668, in entity_service_call
    future.result()  # pop exception if have
  File "/Users/server/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 949, in async_request_call
    await coro
  File "/Users/server/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/service.py", line 705, in _handle_entity_call
    await result
  File "/Users/server/homeassistant/lib/python3.9/site-packages/homeassistant/components/apple_tv/media_player.py", line 456, in async_set_volume_level
    await self.atv.audio.set_volume(volume * 100.0)
  File "/Users/server/homeassistant/lib/python3.9/site-packages/pyatv/core/facade.py", line 433, in set_volume
    await self.relay("set_volume")(level)
  File "/Users/server/homeassistant/lib/python3.9/site-packages/pyatv/protocols/mrp/__init__.py", line 742, in set_volume
    raise exceptions.ProtocolError("no output device")
pyatv.exceptions.ProtocolError: no output device

Actually, everything is broken. It doesn’t show any status. The only thing that works is play audio.

It started working after playing some music first.

I’m having the same problem with reliability of set_volume not working for my HomePods.

Did you discover a reliable fix for scripts? I’m trying to adjust volume BEFORE playing some audio.

Unfortunately no, and I went away from that integration. Too unreliable for my use. It doesn’t work at all at the moment.

Thanks for response - I’ll file a bug report

Does anyone have an update regarding that volume control is only possible during playback and not before?

I really want to use only my HomePods and HomePod Mini’s and not mix them with Google Nest Mini’s.

set_volume worked for me last week, but then if failed on one HomePod but still worked on the others. Now it just fails on all of them. I removed all the HomePods and re-added them, but it still fails.

When I call it from node-red, I just get an error that says:
"Call-service error. "

Maybe AudioOS 16 broke the set_volume API?

facing the same problem. I am now using the logitech media server addon to control volume.

I used volume_set on the Homepod mini for a longer time. It still worked after updating the Homepod to iOS 16.3. Today after HA Update to 2023.01.1 volume_set stopped working and produces a TimeoutError. Have tried to play music before the automation with the volume_set starts did not help.

Postscript: I inserted a media_stop before the volume_set and then the volume_set works!
HA Version 2023.2.2 and iOS 16.3