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

Intents: Fix when 2 states match with same name #12771

Merged
merged 1 commit into from Feb 28, 2018
Merged

Conversation

balloob
Copy link
Member

@balloob balloob commented Feb 28, 2018

Description:

When 2 states have the exact same name, the intent matcher to find a state would fail because it would try to compare 2 state objects using <. This adds the index to the comparison so that in case all other things are equal, we pick the first match.

CC @tschmidty69

Checklist:

  • The code change is tested and works locally.

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.

@balloob balloob requested a review from a team as a code owner February 28, 2018 05:04
@homeassistant homeassistant added cla-signed core small-pr PRs with less than 30 lines. labels Feb 28, 2018
@balloob balloob changed the title Fix when 2 states match with same name Intents: Fix when 2 states match with same name Feb 28, 2018
@balloob balloob merged commit f7e9215 into dev Feb 28, 2018
@balloob balloob deleted the fix-intent-state-match branch February 28, 2018 21:39
@balloob balloob mentioned this pull request Mar 9, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Jul 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed core small-pr PRs with less than 30 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants