home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.91k stars 30.98k forks source link

trigger "conversation": adding variables prevents set_conversation_response #110695

Open h8hr1pzdo3rmiqv5 opened 9 months ago

h8hr1pzdo3rmiqv5 commented 9 months ago

The problem

When using a trigger "conversation" with a _set_conversationresponse, if there are variables set in the trigger, then the _set_conversationresponse orders will not work. The conversation response will always be "Done".

What version of Home Assistant Core has the issue?

2024.2.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Automation

Link to integration documentation on our website

https://www.home-assistant.io/docs/scripts/

Diagnostics information

No response

Example YAML snippet

alias: lights control
description: ""
trigger:
  - platform: conversation
    command:
      - toggle the light
    id: toggle
    variables:
      light_entities:
        - light.mybulb
condition: []
action:
  - set_conversation_response: Light toggled.
  - choose:
      - conditions:
          - condition: trigger
            id:
              - toggle
        sequence:
          - if:
              - condition: template
                value_template: >
                  {% for light in light_entities %} {% if is_state(light, 'off')
                  %} {{ true }}{% break %} {% endif %} {% endfor %}
            then:
              - service: script.light_command
                data:
                  entities: "{{light_entities}}"
                  turnon: true
            else:
              - service: script.light_command
                data:
                  entities: "{{light_entities}}"
                  turnoff: true
mode: single

Anything in the logs that might be useful for us?

No response

Additional information

Remove the variables key from the trigger and the _set_conversationresponse will work.

home-assistant[bot] commented 9 months ago

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

Code owner commands Code owners of `conversation` 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 conversation` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


conversation documentation conversation source (message by IssueLinks)

issue-triage-workflows[bot] commented 6 months ago

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.

h8hr1pzdo3rmiqv5 commented 6 months ago

This problem is still happening on 2024.5.0.

issue-triage-workflows[bot] commented 3 months ago

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.

h8hr1pzdo3rmiqv5 commented 3 months ago

This problem is still happening on 2024.8.0.

issue-triage-workflows[bot] commented 1 week ago

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.

h8hr1pzdo3rmiqv5 commented 1 week ago

This problem is still happening on 2024.11.1.