Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/synology_dsm/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ async def async_step_2sa(self, user_input, errors=None):
def _host_already_configured(self, hostname):
"""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

}
return hostname in existing_hosts

Expand Down