Skip to content

Fix not being able to update entities#19344

Merged
cgarwood merged 1 commit intohome-assistant:devfrom
glentakahashi:patch-1
Dec 16, 2018
Merged

Fix not being able to update entities#19344
cgarwood merged 1 commit intohome-assistant:devfrom
glentakahashi:patch-1

Conversation

@glentakahashi
Copy link
Copy Markdown
Contributor

@glentakahashi glentakahashi commented Dec 16, 2018

Description:

When editing an entity in the frontend dialog, pressing save causes a "save failed: Entity is already registered" error. This is because the frontend always sets name and new_entity_id in the websocket command even if they haven't been changed. This adds a check that the new_entity_id is actually different from entity_id before erroring that the new_entity_id is already registered.

Related issue (if applicable): fixes #

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

When editing an entity in the frontend dialog, pressing save causes a "save failed: Entity is already registered" error. This is because the frontend always sets `name` and `new_entity_id` in the websocket command even if they haven't been changed. This adds a check that the `new_entity_id` is actually different from `entity_id` before erroring that the `new_entity_id` is already registered.
@glentakahashi glentakahashi requested a review from a team as a code owner December 16, 2018 05:17
@homeassistant homeassistant added integration: config merging-to-master This PR is merging into the master branch and should probably change the branch to `dev`. small-pr PRs with less than 30 lines. cla-signed labels Dec 16, 2018
@ghost ghost added the in progress label Dec 16, 2018
@emontnemery
Copy link
Copy Markdown
Contributor

emontnemery commented Dec 16, 2018

This is a regression caused by #19194 and the fix looks good.
The PR should be against dev branch though, not against master.
@glentakahashi Since it would be very nice to have this fixed and merged, I opened #19346 which is your fix, but against dev branch.

@ghost ghost removed the in progress label Dec 16, 2018
@balloob balloob changed the base branch from master to dev December 16, 2018 14:45
@balloob balloob reopened this Dec 16, 2018
@ghost ghost assigned balloob Dec 16, 2018
@ghost ghost added the in progress label Dec 16, 2018
@balloob
Copy link
Copy Markdown
Member

balloob commented Dec 16, 2018

@emontnemery we can just change branch by clicking the edit button at the top 👍

@balloob balloob added this to the 0.84.3 milestone Dec 16, 2018
@balloob balloob removed the merging-to-master This PR is merging into the master branch and should probably change the branch to `dev`. label Dec 16, 2018
@emontnemery
Copy link
Copy Markdown
Contributor

emontnemery commented Dec 16, 2018

@balloob thanks!
Edit: Description updated to remove some irrelevant checklist items

@cgarwood cgarwood merged commit b031ded into home-assistant:dev Dec 16, 2018
@ghost ghost removed the in progress label Dec 16, 2018
@glentakahashi glentakahashi deleted the patch-1 branch December 16, 2018 21:20
balloob pushed a commit that referenced this pull request Dec 17, 2018
When editing an entity in the frontend dialog, pressing save causes a "save failed: Entity is already registered" error. This is because the frontend always sets `name` and `new_entity_id` in the websocket command even if they haven't been changed. This adds a check that the `new_entity_id` is actually different from `entity_id` before erroring that the `new_entity_id` is already registered.
@balloob balloob mentioned this pull request Dec 17, 2018
dshokouhi pushed a commit to dshokouhi/home-assistant that referenced this pull request Dec 25, 2018
When editing an entity in the frontend dialog, pressing save causes a "save failed: Entity is already registered" error. This is because the frontend always sets `name` and `new_entity_id` in the websocket command even if they haven't been changed. This adds a check that the `new_entity_id` is actually different from `entity_id` before erroring that the `new_entity_id` is already registered.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants