Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no data when response_variable in scripts in mode: queued #104218

Open
malinovsku opened this issue Nov 19, 2023 · 12 comments
Open

There is no data when response_variable in scripts in mode: queued #104218

malinovsku opened this issue Nov 19, 2023 · 12 comments

Comments

@malinovsku
Copy link

The problem

When running the script in queued mode and stopping with response_variable, the variable is empty. At the same time, in other modes, the data is returned
Снимок экрана 2023-11-19 в 20 46 57

What version of Home Assistant Core has the issue?

2023.11.2

What was the last working version of Home Assistant Core?

What type of installation are you running?

Home Assistant OS

Integration causing the issue

script

Link to integration documentation on our website

https://www.home-assistant.io/integrations/script/

Diagnostics information

No response

Example YAML snippet

alias: test
sequence:
  - variables:
      resp:
        oth1: 12
        oth2: 99
  - stop: ""
    response_variable: resp
fields: {}
mode: queued

Anything in the logs that might be useful for us?

-

Additional information

No response

@home-assistant
Copy link

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (script) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of script can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign script Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


script documentation
script source
(message by IssueLinks)

@toxikman
Copy link

+1
Still seeing this is Core 2024.1.3.
The bug occurs even when the script is called once. More than one does not need to be queued. If this is an intentional missing feature then it should be in the documentation for Scripts (response_variable).

@PillarsZhang
Copy link

+1
I wasted a lot of time before realizing this was the issue.

@jleinenbach
Copy link

Same here. I think the response_variable could be any name and it's filled with all function return values.
So stop should fill all the variables into this response_variable with any name.
My response_variable is even filled with the string "Success" - it's not even a dict.

@JeffCrum1
Copy link

JeffCrum1 commented May 12, 2024

I am seeing the same thing using set_conversation_response in an automation when mode: queued is used. The response is fine when mode: single.

When mode: queued, I only get 'Done' with any command for the automation.

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 17, 2024
@toxikman
Copy link

Damn, how do I reopen this? This is a valid bug in the software!

@toxikman
Copy link

toxikman commented Aug 18, 2024

Please re-open this @frenck thank you.

@teskanoo
Copy link

home-assistant/home-assistant.io#34738

I have submitted a pull request to update the documentation to reflect the fact that response_variable is not honoured in queued mode scripts

@frenck frenck reopened this Sep 25, 2024
@frenck
Copy link
Member

frenck commented Sep 25, 2024

As requested, as it seems to be still the case.

@dusker33
Copy link

I found that response_variable not work in conditions, too:

alias: test
sequence:

  • if:
    • condition: template
      value_template: "{{ 1 == 1 }}"
      then:
    • variables:
      resp:
      mess: 1111
    • stop: ""
      response_variable: resp

Empty response

@mathmaniac43
Copy link

@dusker33 That relates to #125671

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants