Skip to content

Fix Synology DSM discovery: KeyError: 'host'#35069

Closed
Quentame wants to merge 1 commit intohome-assistant:devfrom
Quentame:synology_dsm/fix-ignore-dicovery
Closed

Fix Synology DSM discovery: KeyError: 'host'#35069
Quentame wants to merge 1 commit intohome-assistant:devfrom
Quentame:synology_dsm/fix-ignore-dicovery

Conversation

@Quentame
Copy link
Copy Markdown
Member

@Quentame Quentame commented May 2, 2020

Proposed change

Fix #34954

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

@Quentame Quentame added this to the 0.109.3 milestone May 2, 2020
@probot-home-assistant
Copy link
Copy Markdown

Hey there @ProtoThis, mind taking a look at this pull request as its been labeled with a integration (synology_dsm) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

"""See if we already have a host matching user input configured."""
existing_hosts = {
entry.data[CONF_HOST] for entry in self._async_current_entries()
entry.data.get(CONF_HOST) for entry in self._async_current_entries()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the case where it defaults to localhost when its missing?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The host is actually required, but it was to fix #34954 until we remove this function to check _macs_already_configured as agrred here #34888 (comment)

Needed stuffs to get the MAC addresses are on 0.8.0 and updated in this PR #35068, and throught this was a breaking change.

But if you correct the MAC addresses, we actually don't need this PR.

(I hope I made myself clear 😄)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I converted this to a draft so it doesn't merge as we should probably fix the duplicate discovery issue instead

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, 0.8.0 adds dsm_api.network.macs to do so 😉

Closing this PR

@bdraco bdraco marked this pull request as draft May 2, 2020 18:38
@Quentame Quentame closed this May 2, 2020
@Quentame Quentame deleted the synology_dsm/fix-ignore-dicovery branch May 2, 2020 21:20
@lock lock Bot locked and limited conversation to collaborators May 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Synology DSM discovery: KeyError: 'host'

3 participants