Custom sentence automation completes fully, but the voice pipeline doesn't respond

Hi there Home Assistant community members! I am working on an automation to return the weather of an arbitrary location using assist. I currently have the automation working, though triggering it through a voice pipeline does not work.

Here are the details of the automations:
Rest commands:

rest_command:
  get_lat_long_of_place:
    headers: 
      user-agent: HASSgeoencode/1.0
    url: https://nominatim.openstreetmap.org/search?q={{ place }}&format=json

  get_forecast_of_place:
    headers: 
      user-agent: HASSsingleShotForecast/1.0
    url: https://api.met.no/weatherapi/locationforecast/2.0/complete?lat={{ lat }}&lon={{ lon }}

Automation:

alias: "Assist: Arbitrary Weather"
description: ""
triggers:
  - trigger: conversation
    command:
      - what('s| is) the [current] weather [like] [(now|right now)] in {place}
conditions: []
actions:
  - action: rest_command.get_lat_long_of_place
    metadata: {}
    data:
      place: "{{ trigger.slots.place }}"
    response_variable: geocoded_response
  - action: rest_command.get_forecast_of_place
    metadata: {}
    data:
      lat: "{{geocoded_response['content'][0]['lat']}}"
      lon: "{{geocoded_response['content'][0]['lon']}}"
    response_variable: local_forecast
  - set_conversation_response: >-
      In {{trigger.slots.place}} it is {{
      local_forecast['content']['properties']['timeseries'][0]['data']['instant']['details']['air_temperature']*(9/5)+32
      }}°F and {{
      local_forecast['content']['properties']['timeseries'][0]['data']['next_1_hours']['summary']['symbol_code']
      }}. The high is {{
      local_forecast['content']['properties']['timeseries'][0]['data']['next_6_hours']['details']['air_temperature_max']*(9/5)+32
      }}°F and the low is {{
      local_forecast['content']['properties']['timeseries'][0]['data']['next_6_hours']['details']['air_temperature_min']*(9/5)+32
      }}°F.
mode: single

With the automation in it’s current state, here is a debug of the conversation and the traces of the automation.
Debug:


Raw:

stage: done
run:
  pipeline: 01h06a28v7ewdjhwgyghbgcbt8
  language: en
  conversation_id: 01KDV0S86N822KYKEHHYZ9T349
  runner_data:
    stt_binary_handler_id: null
    timeout: 300
events:
  - type: run-start
    data:
      pipeline: 01h06a28v7ewdjhwgyghbgcbt8
      language: en
      conversation_id: 01KDV0S86N822KYKEHHYZ9T349
      runner_data:
        stt_binary_handler_id: null
        timeout: 300
    timestamp: "2025-12-31T20:14:57.756356+00:00"
  - type: intent-start
    data:
      engine: conversation.home_assistant
      language: en
      intent_input: What is the weather like in new york city
      conversation_id: 01KDV0S86N822KYKEHHYZ9T349
      device_id: null
      satellite_id: null
      prefer_local_intents: false
    timestamp: "2025-12-31T20:14:57.756383+00:00"
  - type: intent-end
    data:
      processed_locally: true
      intent_output:
        response:
          speech:
            plain:
              speech: Unable to get forecasts for like in new york city
              extra_data: null
          card: {}
          language: en
          response_type: action_done
          data:
            targets: []
            success: []
            failed: []
        conversation_id: 01KDV0S86N822KYKEHHYZ9T349
        continue_conversation: false
    timestamp: "2025-12-31T20:14:57.771847+00:00"
  - type: run-end
    data: null
    timestamp: "2025-12-31T20:14:57.771861+00:00"
started: 2025-12-31T20:14:57.756Z
intent:
  engine: conversation.home_assistant
  language: en
  intent_input: What is the weather like in new york city
  conversation_id: 01KDV0S86N822KYKEHHYZ9T349
  device_id: null
  satellite_id: null
  prefer_local_intents: false
  done: true
  processed_locally: true
  intent_output:
    response:
      speech:
        plain:
          speech: Unable to get forecasts for like in new york city
          extra_data: null
      card: {}
      language: en
      response_type: action_done
      data:
        targets: []
        success: []
        failed: []
    conversation_id: 01KDV0S86N822KYKEHHYZ9T349
    continue_conversation: false
finished: 2025-12-31T20:14:57.771Z

Trace:


Given that the automation completes successfully, and returns the conversation response, I do not understand why assist returns “Unable to get forecasts for like in new york city” or similar. One hunch I had is that the automation may be taking too long and assist is timing out. From a quick look online, I wasn’t able to find any details to help with that though.

Any help would be appreciated!

I’m not sure this is your issue, but putting ‘new york city’ into your rest URL might be causing the url to have unencoded spaces in it (unless HA just takes care of it).

Thats where I’d start looking.

What does the trace show for geocoded_response? Is it correct? Start at the top and work down looking at changed variables and everything to make sure you are getting the responses you expect.

Both API responses work, as far as I can tell. Here are the traces of the two RESTful command calls.
get_lat_long_of_place:

get_forecast_of_place:


The response from this one is too long to put in the body of this post, but it returns as expected.

Go to the top right three dot in the top right, download the JSON, and paste it here in the </> tag please. Much easier to look at than screen shots.

Here is most of the json but the weather forecast response from met.no is too long to fully post.

{
  "trace": {
    "last_step": "action/2",
    "run_id": "794453cd9da4fa8660e7a9de524de913",
    "state": "stopped",
    "script_execution": "finished",
    "timestamp": {
      "start": "2025-12-31T21:41:50.809573+00:00",
      "finish": "2025-12-31T21:41:52.238160+00:00"
    },
    "domain": "automation",
    "item_id": "1767023154052",
    "trigger": null,
    "trace": {
      "trigger/0": [
        {
          "path": "trigger/0",
          "timestamp": "2025-12-31T21:41:50.809602+00:00",
          "changed_variables": {
            "this": {
              "entity_id": "automation.assist_arbitrary_weather",
              "state": "on",
              "attributes": {
                "id": "1767023154052",
                "last_triggered": "2025-12-31T20:26:40.242401+00:00",
                "mode": "single",
                "current": 0,
                "friendly_name": "Assist: Arbitrary Weather"
              },
              "last_changed": "2025-12-31T20:25:35.813534+00:00",
              "last_reported": "2025-12-31T20:26:41.491700+00:00",
              "last_updated": "2025-12-31T20:26:41.491700+00:00",
              "context": {
                "id": "01KDV1EP7JZS0JBY70SQXCND0F",
                "parent_id": null,
                "user_id": null
              }
            },
            "trigger": {
              "id": "0",
              "idx": "0",
              "alias": null,
              "platform": "conversation",
              "sentence": "what is the weather like in new york city",
              "details": {
                "place": {
                  "name": "place",
                  "text": "new york city",
                  "value": "new york city"
                }
              },
              "slots": {
                "place": "new york city"
              },
              "device_id": null,
              "satellite_id": null,
              "user_input": {
                "text": "what is the weather like in new york city",
                "context": {
                  "id": "01KDV5RB2H726SH3JM9SWTPT92",
                  "parent_id": null,
                  "user_id": "a5426c15e71540b580ba2133ff4803f7"
                },
                "conversation_id": "01KDV5RB2JSBR575EZ5HT9P5FX",
                "device_id": null,
                "satellite_id": null,
                "language": "en",
                "agent_id": "conversation.home_assistant",
                "extra_system_prompt": null
              }
            }
          }
        }
      ],
      "action/0": [
        {
          "path": "action/0",
          "timestamp": "2025-12-31T21:41:50.809868+00:00",
          "changed_variables": {
            "context": {
              "id": "01KDV5RB2S3NBE1VTBZZTAB3PT",
              "parent_id": null,
              "user_id": null
            },
            "geocoded_response": {
              "content": [
                {
                  "place_id": 423784731,
                  "licence": "Data © OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright",
                  "osm_type": "relation",
                  "osm_id": 175905,
                  "lat": "40.7127281",
                  "lon": "-74.0060152",
                  "class": "boundary",
                  "type": "administrative",
                  "place_rank": 10,
                  "importance": 0.8817923363604117,
                  "addresstype": "city",
                  "name": "City of New York",
                  "display_name": "City of New York, New York, United States",
                  "boundingbox": [
                    "40.4765780",
                    "40.9176300",
                    "-74.2588430",
                    "-73.7002330"
                  ]
                }
              ],
              "status": 200,
              "headers": {
                "Server": "nginx",
                "Date": "Wed, 31 Dec 2025 21:41:51 GMT",
                "Content-Type": "application/json; charset=utf-8",
                "Content-Length": "451",
                "Connection": "keep-alive",
                "Keep-Alive": "timeout=20",
                "Vary": "accept-language"
              }
            }
          },
          "result": {
            "params": {
              "domain": "rest_command",
              "service": "get_lat_long_of_place",
              "service_data": {
                "place": "new york city"
              },
              "target": {}
            },
            "running_script": false
          }
        }
      ],
      "action/1": [
        {
          "path": "action/1",
          "timestamp": "2025-12-31T21:41:51.685746+00:00",
          "changed_variables": {
            "local_forecast": {
              "content": {
                "type": "Feature",
                "geometry": {
                  "type": "Point",
                  "coordinates": [
                    -74.006,
                    40.7127,
                    28
                  ]
                },
                "properties": {
                  "meta": {
                    "updated_at": "2025-12-31T19:16:16Z",
                    "units": {
                      "air_pressure_at_sea_level": "hPa",
                      "air_temperature": "celsius",
                      "air_temperature_max": "celsius",
                      "air_temperature_min": "celsius",
                      "cloud_area_fraction": "%",
                      "cloud_area_fraction_high": "%",
                      "cloud_area_fraction_low": "%",
                      "cloud_area_fraction_medium": "%",
                      "dew_point_temperature": "celsius",
                      "fog_area_fraction": "%",
                      "precipitation_amount": "mm",
                      "relative_humidity": "%",
                      "ultraviolet_index_clear_sky": "1",
                      "wind_from_direction": "degrees",
                      "wind_speed": "m/s"
                    }
                  },
                  "timeseries": [
                    {
                      "time": "2025-12-31T21:00:00Z",
                      "data": {
                        "instant": {
                          "details": {
                            "air_pressure_at_sea_level": 1008.3,
                            "air_temperature": -1.4,
                            "cloud_area_fraction": 9.4,
                            "cloud_area_fraction_high": 4.7,
                            "cloud_area_fraction_low": 0.8,
                            "cloud_area_fraction_medium": 7.8,
                            "dew_point_temperature": -9.6,
                            "fog_area_fraction": 0,
                            "relative_humidity": 53.5,
                            "ultraviolet_index_clear_sky": 0.1,
                            "wind_from_direction": 253.6,
                            "wind_speed": 5.4
                          }
                        },
                        "next_12_hours": {
                          "summary": {
                            "symbol_code": "partlycloudy_night"
                          },
                          "details": {}
                        },
                        "next_1_hours": {
                          "summary": {
                            "symbol_code": "clearsky_day"
                          },
                          "details": {
                            "precipitation_amount": 0
                          }
                        },
                        "next_6_hours": {
                          "summary": {
                            "symbol_code": "partlycloudy_night"
                          },
                          "details": {
                            "air_temperature_max": -1.1,
                            "air_temperature_min": -2.3,
                            "precipitation_amount": 0
                          }
                        }
                      }
                    },
                    {

 "status": 200,
              "headers": {
                "Server": "nginx/1.18.0 (Ubuntu)",
                "Date": "Wed, 31 Dec 2025 21:41:52 GMT",
                "Content-Type": "application/json",
                "Content-Length": "4396",
                "Connection": "keep-alive",
                "Last-Modified": "Wed, 31 Dec 2025 21:41:52 GMT",
                "Expires": "Wed, 31 Dec 2025 22:12:46 GMT",
                "X-Backend-Host": "b_157_249_79_114_loc",
                "Access-Control-Allow-Origin": "*",
                "Access-Control-Allow-Methods": "GET",
                "Access-Control-Allow-Headers": "Origin",
                "Content-Encoding": "gzip",
                "Vary": "Accept, Accept-Encoding",
                "X-Varnish": "6086353268",
                "Age": "0",
                "Via": "1.1 dalton-a (Varnish/7.7)",
                "Accept-Ranges": "bytes"
              }
            }
          },
          "result": {
            "params": {
              "domain": "rest_command",
              "service": "get_forecast_of_place",
              "service_data": {
                "lat": 40.7127281,
                "lon": -74.0060152
              },
              "target": {}
            },
            "running_script": false
          }
        }
      ],
      "action/2": [
        {
          "path": "action/2",
          "timestamp": "2025-12-31T21:41:52.235329+00:00",
          "result": {
            "conversation_response": "In new york city it is 29.48°F and clearsky_day. The high is 30.02°F and the low is 27.86°F."
          }
        }
      ]
    },
    "config": {
      "id": "1767023154052",
      "alias": "Assist: Arbitrary Weather",
      "description": "",
      "triggers": [
        {
          "trigger": "conversation",
          "command": [
            "what('s| is) the [current] weather [like] [(now|right now)] in {place}"
          ]
        }
      ],
      "conditions": [],
      "actions": [
        {
          "action": "rest_command.get_lat_long_of_place",
          "metadata": {},
          "data": {
            "place": "{{ trigger.slots.place }}"
          },
          "response_variable": "geocoded_response"
        },
        {
          "action": "rest_command.get_forecast_of_place",
          "metadata": {},
          "data": {
            "lat": "{{geocoded_response['content'][0]['lat']}}",
            "lon": "{{geocoded_response['content'][0]['lon']}}"
          },
          "response_variable": "local_forecast"
        },
        {
          "set_conversation_response": "In {{trigger.slots.place}} it is {{ local_forecast['content']['properties']['timeseries'][0]['data']['instant']['details']['air_temperature']*(9/5)+32 }}°F and {{ local_forecast['content']['properties']['timeseries'][0]['data']['next_1_hours']['summary']['symbol_code'] }}. The high is {{ local_forecast['content']['properties']['timeseries'][0]['data']['next_6_hours']['details']['air_temperature_max']*(9/5)+32 }}°F and the low is {{ local_forecast['content']['properties']['timeseries'][0]['data']['next_6_hours']['details']['air_temperature_min']*(9/5)+32 }}°F."
        }
      ],
      "mode": "single"
    },
    "blueprint_inputs": null,
    "context": {
      "id": "01KDV5RB2S3NBE1VTBZZTAB3PT",
      "parent_id": null,
      "user_id": null
    }
  },
  "logbookEntries": [
    {
      "name": "Assist: Arbitrary Weather",
      "message": "triggered",
      "source": null,
      "entity_id": "automation.assist_arbitrary_weather",
      "context_id": "01KDV5RB2S3NBE1VTBZZTAB3PT",
      "domain": "automation",
      "when": 1767217310.8096793
    }
  ]
}

Thanks for the help everyone! I was able to get some help on the discord. The root cause was that I had another custom sentence automation from a blueprint that was also triggering. That automation was finishing first and returning the failure message.

I was able to debug this by setting a completely unique trigger sentence to test the automation, and then disabling the interfering automation.

1 Like