pyatv: volume_set not working with tts.cloud_say
Describe the bug
I am trying to set the volume level when using the tts.cloud_say service in home assistant.
I can see the volume is changed correctly as per the first action but then when the HomePod plays the tts it automatically changes the volume to what appears to be 0.2, after it finishes and playing it sets the volume back to what was set in the first action even though I do not specify a second volume set action.
It appears to be related to the fact the tts message is played using RAOP which has different volume controls but I cannot see how to set those so the tts messages are played at a volume they can be heard?
Error log
<place log here>
How to reproduce the bug?
Use these actions in a home assistant automation
action:
- service: media_player.volume_set data: volume_level: 0.7 target: entity_id: media_player.living_room_homepod
- delay: hours: 0 minutes: 0 seconds: 5 milliseconds: 0
- service: tts.cloud_say data: entity_id: media_player.living_room_homepod message: Test Message
What is expected behavior?
The tts message is played at the volume set in the automation.
Operating System
HassOS
Python
3.9
pyatv
latest?
Device
HomePod Mini
Additional context
None
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 34 (17 by maintainers)
Commits related to this issue
- core: Dispatch volume changes in protocols Relates to #1522 — committed to postlund/pyatv by postlund 3 years ago
- raop: Override volume from other protocols The volume state in RAOP was (potentially) only derived by the first connection made to the remote device. Mainly becuase no persistent connection is mainta... — committed to postlund/pyatv by postlund 3 years ago
- core: Dispatch volume changes in protocols Relates to #1522 — committed to postlund/pyatv by postlund 3 years ago
- raop: Override volume from other protocols The volume state in RAOP was (potentially) only derived by the first connection made to the remote device. Mainly becuase no persistent connection is mainta... — committed to postlund/pyatv by postlund 3 years ago
Instructions are here:
https://github.com/postlund/hass-atv-beta#debug-logs
If you already have a default level, please set that to warning or higher as it pollutes the log and makes it unreadable otherwise. If you have more than one device set up via the Apple TV integration, I suggest you disable the other ones while extracting logs for the same reason.
I still have the original issue I reported, I emailed the logs for investigation. Thanks
Logs shared today - sorry for delay 😃