Where Do I look to Solve this Error

I was going through the logs looking for any signs of trouble when I came across this;

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/template/coordinator.py", line 115, in _handle_triggered_with_script
    if script_result := await self._script.async_run(run_variables, script_context):
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1828, in async_run
    return await asyncio.shield(create_eager_task(run.async_run()))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 460, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step
    self._handle_exception(
    ~~~~~~~~~~~~~~~~~~~~~~^
        ex, continue_on_error, self._log_exceptions or log_exceptions
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 556, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 524, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1009, in _async_step_call_service
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<9 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 624, in _async_run_long_action
    return await long_task
           ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2794, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2837, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call
    raise HomeAssistantError(
        "Service call requested response data but did not match any entities"
    )
homeassistant.exceptions.HomeAssistantError: Service call requested response data but did not match any entities
2025-03-20 20:08:47.598 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)

This error has appeared once a day at various times over the last week. I don’t know if the error was occurring earlier than a week ago as the log only goes back a week.

I’d like to find and correct the cause however I don’t know where to start looking. I looked for the files named within the error but I couldn’t fid them.

Any help in identifying the cause and correcting the error would be greatly appreciated.

Service call requested response data but did not match any entities

Service call requested response data but did not match any entities

To me this suggests that somewhere you are using an action (likely in an automation) to run a script that should be returning a response. Not sure if entities here means script entities or what though. I’d start with checking any automations who’s triggered time coresponds with the error messages time, and scripts within the same timeframe. Check their traces.

There.
A bad entity in a script response. Assist maybe?
UPDATE…
Sorry, responded but didn’t read down so what Rick Furtado said…

Thanks to both @HappyCadaver and @Sir_Goodenough. The hunt is now on for where the problem is.

It took a while to resolve this issue. But I finally found what the cause was. The Environment Canada integration was having an issue reading information from the site at 8: 02 every night. The integrations author figured out what the problem was. It now caches the current reading and uses that should the next reading be unavailable.

LOL well dam was I way off, was experiencing the same issue without making the connection :roll_eyes:.

1 Like