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

Revert change to MQTT discovery_hash introduced in #18169 #18763

Merged
merged 1 commit into from Nov 30, 2018

Conversation

Projects
None yet
4 participants
@emontnemery
Copy link
Contributor

commented Nov 28, 2018

Description:

discovery_hash was changed in #18169 to be unique_id if present in the configuration.
This breaks the possibility to remove a previously discovered entity by sending an empty discovery update.

Checklist:

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

@emontnemery emontnemery requested a review from home-assistant/core as a code owner Nov 28, 2018

@ghost ghost assigned emontnemery Nov 28, 2018

@ghost ghost added the in progress label Nov 28, 2018

@emontnemery

This comment has been minimized.

Copy link
Contributor Author

commented Nov 28, 2018

@OttoWinter I think you suggested to use the unique_id as the discovery hash, although I can't find the comment.
If there was a good reason for that, maybe add a check for object_id being equal to the unique_id instead?

@OttoWinter

This comment has been minimized.

Copy link
Contributor

commented Nov 28, 2018

I think it was more of a question, like "what should we do if unique id changes?". The issue was that using the system you implemented first entities with unqiue ids would not be recreatable since their entity id registration would error out because of duplicate unique ids.

But anyway, yes the ability to remove discovered entities with unqiue id would be good. Personally I don't see an issue with doing it the old way (not using unqiue id in discovery hash), you probably won't see too many scenarios where unique IDs on the same entity changes dynamically in the wild anyway. I guess let's just keep that undefined behavior, it probably won't be an issue.

@emontnemery emontnemery force-pushed the emontnemery:mqtt_fix_discovery_hash branch from e072e0c to 06b3407 Nov 28, 2018

@emontnemery

This comment has been minimized.

Copy link
Contributor Author

commented Nov 29, 2018

@OttoWinter OK, so this should be fine to merge then?

@OttoWinter OttoWinter added this to the 0.83.2 milestone Nov 30, 2018

@OttoWinter OttoWinter merged commit a9990c1 into home-assistant:dev Nov 30, 2018

5 checks passed

Hound No violations found. Woof!
WIP ready for review
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 92.944%
Details

@ghost ghost removed the in progress label Nov 30, 2018

balloob added a commit that referenced this pull request Nov 30, 2018

@balloob balloob referenced this pull request Nov 30, 2018

Merged

0.83.2 #18857

mxworm added a commit to mxworm/home-assistant that referenced this pull request Dec 1, 2018

Merge branch 'dev' of https://github.com/home-assistant/home-assistant
…into dev

* 'dev' of https://github.com/home-assistant/home-assistant: (122 commits)
  Reintroduce unique_id for Netatmo sensor (home-assistant#18774)
  Fix ordinal filter in template (home-assistant#18878)
  fixed state case for rtorrent (home-assistant#18778)
  Updated UVC camera component to support SSL connections (home-assistant#18829)
  Added new filters for templates (home-assistant#18125)
  Add support for zha device registry (home-assistant#18755)
  Add tests for directv platform (home-assistant#18590)
  Fix issues with 17track.net sensor names (home-assistant#18860)
  Bump py17track to 2.1.1 (home-assistant#18861)
  RFC: Call services directly (home-assistant#18720)
  Fix flaky geofency test (home-assistant#18855)
  Update of volvooncall component (home-assistant#18702)
  Always set hass_user (home-assistant#18844)
  Hotfix for Fibaro wall plug (home-assistant#18845)
  Add services description (home-assistant#18839)
  update netatmo library (home-assistant#18823)
  Revert change to MQTT discovery_hash introduced in home-assistant#18169 (home-assistant#18763)
  bump gtts-token to 1.1.3 (home-assistant#18824)
  Add Entur departure information sensor (home-assistant#17286)
  Bump python_awair to 0.0.3 (home-assistant#18819)
  ...

@emontnemery emontnemery deleted the emontnemery:mqtt_fix_discovery_hash branch Dec 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.