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

Simplify data_key for a stable unique_id #19766

Merged
merged 1 commit into from Jan 7, 2019

Conversation

@syssi
Copy link
Member

syssi commented Jan 4, 2019

Simplify data_key for a stable unique_id because the order of the dict will not be preserved.

Without this patch the unique_id of the cover entity can be status158d0002254951 or pos158d0002254951 and flips probably on each restart.

Description:

Related issue (if applicable): fixes #13522

@OttoWinter
Copy link
Contributor

OttoWinter left a comment

Is this a breaking change?

@syssi

This comment has been minimized.

Copy link
Member

syssi commented Jan 7, 2019

It's a bugfix. If somebody restarts Home Assistant until the entity_id is "fine" and a unique_id prefixed by "pos" is in use it's a breaking change somehow.

@syssi syssi merged commit 8b232e7 into home-assistant:dev Jan 7, 2019

5 checks passed

Hound No violations found. Woof!
WIP Legacy commit status override — see details
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 93.082%
Details

@wafflebot wafflebot bot removed the in progress label Jan 7, 2019

balloob added a commit that referenced this pull request Jan 9, 2019

@balloob balloob referenced this pull request Jan 10, 2019

Merged

0.85.0 #19897

rymsha added a commit to rymsha/home-assistant that referenced this pull request Jan 12, 2019

rymsha added a commit to rymsha/home-assistant that referenced this pull request Jan 12, 2019

@moskovskiy82

This comment has been minimized.

Copy link

moskovskiy82 commented Jan 12, 2019

@syssi
It is a breaking change. Since i believe 0.34 or something like that cover was always an entity_id of
"unique_id": "status_status_pos_curtain_levelxxxx

Now it switches to "unique_id": "statusxxx"

Furthermore the entity cannot be renamed from the frontend as entity already exists so editing core.entity_registry is required

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