Get conversation inputs and outputs to dashboard

If you are looking for a way to capture what the assistant heard and says then you can add the following to your voice assistant device yaml configuration. This gives you a text sensor within Home Assistant with the last conversation request and response.

text_sensor:
###### Text Request ######
  - platform: template
    id: text_request
    name: Text Request
    icon: mdi:message-processing
    internal: false
    on_value:
      lambda: |-
        if(id(text_request).state.length()>32) {
          std::string name = id(text_request).state.c_str();
          std::string truncated = esphome::str_truncate(name.c_str(),31);
          id(text_request).state = (truncated+"...").c_str();
        }


###### Text Response ######
  - platform: template
    id: text_response
    name: Text Response
    icon: mdi:message-reply-text
    internal: false
    on_value:
      lambda: |-
        if(id(text_response).state.length()>32) {
          std::string name = id(text_response).state.c_str();
          std::string truncated = esphome::str_truncate(name.c_str(),31);
          id(text_response).state = (truncated+"...").c_str();
        }


voice_assistant:
...
  on_listening:
    - lambda: id(text_request).publish_state("...");
    - lambda: id(text_response).publish_state("...");
  on_stt_end:
    - text_sensor.template.publish:
        id: text_request
        state: !lambda return x;
  on_tts_start:
    - text_sensor.template.publish:
        id: text_response
        state: !lambda return x;

Hope this helps you out.