I have been trying to run the "Set up voice assistant" wizard and consistently getting the error message "The voice assistant is unable to connect to Home Assistant".
In my home assistant network settings I have a specific local network url set as my main url requires mTLS authentication through cloudflare.
The local url is https on a sub-domain of my main url. I use a lets encrypt cert which is valid for both domains. I have a DNS re-write set in AdGuard Home, for the subdomain to point to my HA server. The AdGuard Home DNS is set as the default on my router.
eg:
main url: https://home.example.com
local url: https://local.home.example.com:8123
After enabling debug logging through the esphome yaml I can see that when i run the setup wizard it is setting "Media URL" based on my "main" home assistant URL, not my local one.
[08:16:12][D][media_player:074]: 'Media Player' - Setting
[08:16:12][D][media_player:078]: Command: ENQUEUE
[08:16:12][D][media_player:081]: Media URL: https://home.example.com/api/esphome/ffmpeg_proxy/b4658d46f9a30d2d2cd40119add9871e/JBahvCEOJxMzGnjLp1aNUg.flac
[08:16:12][D][media_player:087]: Announcement: yes
This then fails as that requires mTLS.
Am i missing something? How do I get it to use the local URL?