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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use common strings for Harmony config flow #41094

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/harmony/config_flow.py
Expand Up @@ -87,7 +87,7 @@ async def async_step_ssdp(self, discovery_info):
friendly_name = discovery_info[ssdp.ATTR_UPNP_FRIENDLY_NAME]

if self._host_already_configured(parsed_url.hostname):
return self.async_abort(reason="already_configured")
return self.async_abort(reason="already_configured_device")

# pylint: disable=no-member
self.context["title_placeholders"] = {"name": friendly_name}
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/harmony/strings.json
Expand Up @@ -19,7 +19,7 @@
"unknown": "[%key:common::config_flow::error::unknown%]"
},
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
"already_configured_device": "[%key:common::config_flow::abort::already_configured_device%]"
Copy link
Member

Choose a reason for hiding this comment

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

This should be reverted. The key needs to be already_configured to map to our helper method that aborts the flow if an existing entry has the same unique id.

This is an exception where the key can't match the the common string key.

}
},
"options": {
Expand Down