esphome / firmware

Holds firmware configuration files for projects that the ESPHome team provides.
https://esphome.io/projects
Apache License 2.0
160 stars 121 forks source link

Feature Request: Add the possibility to cast the tts response to media player devices #258

Open lajoshanko opened 2 months ago

lajoshanko commented 2 months ago

Since the M5Stack Echo and the ESP32 Box devices have pretty quiet speakers it would be nice to have a feature toggle to cast the voice response the media player devices.

Currently as a workaround the following config can be added to the esphome device config to cast the response to the device.
Where the entity_id is optionally populated from a template select from home assistant.

    - homeassistant.service:
        service: media_player.play_media
        data:
          entity_id: media_player.media_player_entity
          media_content_id: !lambda 'return x;'
          media_content_type: music
          announce: "true" 

Features on the esphome device config page:

  1. A feature toggle to turn the casting on/off.
  2. A select list of mediaplayers where the state is not off, unavailable, unknown.
  3. Maybe a feature toggle to mute the esphome device built-in speaker.
igorsantos07 commented 5 days ago

While this is definitely an awesome idea (and I'm a complete newbie to ESP32 stuff), shouldn't this be pointed to the HA repository (as it's the one processing the request, generating the response and probably sending it back to the satellite) instead of the satellite firmware repo?

I also second the "mute speaker" feature, which I guess would belong here, indeed - maybe they'll want a separate issue so it's easier to track.