No options for Content type in Visual Editor

I’m running HAOS on an Intel NUC with everything up to date. Until recently I was able to create and edit scripts and automations in the Visual Editor but now I’ve hit a major stumbling block. Something seems to have broken in my setup - this problem remains after restarting Home Assistant.

I’m trying to add a simple speech response, something I’ve done in a few other automations with the help of the Visual Editor. After specifying the device for an action (Play media) I go to add the content type, but no list of options appears for this in the Visual Editor - as it used to. The device Corner is valid and works in other scripts and automations.

I’ve tried typing “speech”, sentence" and “tts” next to Content type but no pop-up list appears. I’ve tried starting a new script in case the problem was with the script itself, with the same result. I’ve attempted to use plain YAML for this but the syntax is beyond me, even when looking at the YAML for similar scripts.

Has anyone else seen this problem, or have I missed specifying something obvious? (I’m wondering if the issue is related to the new HA categories such as floors - none of which I’ve added to my seup yet.)

Thanks for your time.

There’s no pop-up on mine either. If you have a pre-recorded speech response you just type in “music” with the filename in the content ID field:

service: media_player.play_media
  media_content_id: >-
    {{ announcement |
    default("http://homeassistant.local:8123/local/sounds/wake_tone.mp3") }}
  media_content_type: music

I can’t find a list of valid content types (you’d think there would be one somewhere… :roll_eyes:) but I think if you’re using TTS you need to use the tts.speak service rather than media player.

Thanks Stiltjack. My old scripts use “Play media” and still seem to work, so I’m puzzled. Here’s an extract from one of my old automations that uses it, and which I’ve just run successfully,

- service: media_player.play_media
      entity_id: media_player.bedside
      media_content_id: >-
      media_content_type: provider
      title: Good morning Monkey
      media_class: app
      children_media_class: null
        - {}
        - media_content_type: app
          media_content_id: media-source://tts
        - media_content_type: provider
          media_content_id: >-

Unfortunately editing this in YAML (to use it in a new script) is much more difficult than expected.

I suspect all this changed during the “Year of the Voice” - which I confess, passed me by a bit. :flushed:

Is this any use?

Thanks Stiltjack. I’ve tried doing as advised in the first one and the script then compiled. It seems that tts.speak is a simpler way of doing the same thing. However, this will still be a big problem with sources like radio where (for users like me) it will be impossible to specify the station for the media player without access to the Radio Browser that we used to have via the popup.

Edit: I discovered this didn’t work either. Despite having Google tts and links to Piper and configured, when I try to select a device I get “No matching devices found”. This is probably due to the issue for Google Cast devices mentioned in the documentation. To understand the workaround that seems to be suggested, I would need an example of how to construct a URL containing the IP address because the syntax is beyond me.