Skip to content
Merged
Show file tree
Hide file tree
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/dialogflow/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
},
"abort": {
"one_instance_allowed": "Only a single instance is necessary.",
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]",
"not_internet_accessible": "Your Home Assistant instance needs to be accessible from the internet to receive Dialogflow messages."
},
"create_entry": {
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/geofency/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
},
"abort": {
"one_instance_allowed": "Only a single instance is necessary.",
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]",
"not_internet_accessible": "Your Home Assistant instance needs to be accessible from the internet to receive messages from Geofency."
},
"create_entry": {
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/gpslogger/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
},
"abort": {
"one_instance_allowed": "Only a single instance is necessary.",
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]",
"not_internet_accessible": "Your Home Assistant instance needs to be accessible from the internet to receive messages from GPSLogger."
},
"create_entry": {
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/ifttt/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
},
"abort": {
"one_instance_allowed": "Only a single instance is necessary.",
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]",
"not_internet_accessible": "Your Home Assistant instance needs to be accessible from the internet to receive IFTTT messages."
},
"create_entry": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def async_get_options_flow(config_entry):
async def async_step_user(self, user_input=None):
"""Handle a flow initialized by the user."""
if self._async_current_entries():
return self.async_abort(reason="one_instance_allowed")
return self.async_abort(reason="single_instance_allowed")

if user_input is None:
return self.async_show_form(step_id="user")
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/islamic_prayer_times/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
},
"abort": {
"one_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]"
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]"
}
},
"options": {
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/locative/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
},
"abort": {
"one_instance_allowed": "Only a single instance is necessary.",
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]",
"not_internet_accessible": "Your Home Assistant instance needs to be accessible from the internet to receive messages from Geofency."
},
"create_entry": {
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/mailgun/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
},
"abort": {
"one_instance_allowed": "Only a single instance is necessary.",
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]",
"not_internet_accessible": "Your Home Assistant instance needs to be accessible from the internet to receive Mailgun messages."
},
"create_entry": {
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/owntracks/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class OwnTracksFlow(config_entries.ConfigFlow, domain=DOMAIN):
async def async_step_user(self, user_input=None):
"""Handle a user initiated set up flow to create OwnTracks webhook."""
if self._async_current_entries():
return self.async_abort(reason="one_instance_allowed")
return self.async_abort(reason="single_instance_allowed")

if user_input is None:
return self.async_show_form(step_id="user")
Expand Down Expand Up @@ -52,7 +52,7 @@ async def async_step_user(self, user_input=None):
async def async_step_import(self, user_input):
"""Import a config flow from configuration."""
if self._async_current_entries():
return self.async_abort(reason="one_instance_allowed")
return self.async_abort(reason="single_instance_allowed")
webhook_id, _webhook_url, cloudhook = await self._get_webhook_id()
secret = secrets.token_hex(16)
return self.async_create_entry(
Expand Down
4 changes: 3 additions & 1 deletion homeassistant/components/owntracks/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"description": "Are you sure you want to set up OwnTracks?"
}
},
"abort": { "one_instance_allowed": "Only a single instance is necessary." },
"abort": {
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]"
},
"create_entry": {
"default": "\n\nOn Android, open [the OwnTracks app]({android_url}), go to preferences -> connection. Change the following settings:\n - Mode: Private HTTP\n - Host: {webhook_url}\n - Identification:\n - Username: `'<Your name>'`\n - Device ID: `'<Your device name>'`\n\nOn iOS, open [the OwnTracks app]({ios_url}), tap (i) icon in top left -> settings. Change the following settings:\n - Mode: HTTP\n - URL: {webhook_url}\n - Turn on authentication\n - UserID: `'<Your name>'`\n\n{secret}\n\nSee [the documentation]({docs_url}) for more information."
}
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/ozw/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DomainConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
async def async_step_user(self, user_input=None):
"""Handle the initial step."""
if self._async_current_entries():
return self.async_abort(reason="one_instance_allowed")
return self.async_abort(reason="single_instance_allowed")
if "mqtt" not in self.hass.config.components:
return self.async_abort(reason="mqtt_required")
if user_input is not None:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/ozw/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}
},
"abort": {
"one_instance_allowed": "The integration only supports one Z-Wave instance",
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]",
"mqtt_required": "The MQTT integration is not set up"
}
}
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/plaato/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
},
"abort": {
"one_instance_allowed": "Only a single instance is necessary.",
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]",
"not_internet_accessible": "Your Home Assistant instance needs to be accessible from the internet to receive messages from Plaato Airlock."
},
"create_entry": {
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/speedtestdotnet/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def async_get_options_flow(config_entry):
async def async_step_user(self, user_input=None):
"""Handle a flow initialized by the user."""
if self._async_current_entries():
return self.async_abort(reason="one_instance_allowed")
return self.async_abort(reason="single_instance_allowed")

if user_input is None:
return self.async_show_form(step_id="user")
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/speedtestdotnet/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
},
"abort": {
"one_instance_allowed": "Only a single instance is necessary.",
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]",
"wrong_server_id": "Server id is not valid"
}
},
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/traccar/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
},
"abort": {
"one_instance_allowed": "Only a single instance is necessary.",
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]",
"not_internet_accessible": "Your Home Assistant instance needs to be accessible from the internet to receive messages from Traccar."
},
"create_entry": {
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/twilio/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
},
"abort": {
"one_instance_allowed": "Only a single instance is necessary.",
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]",
"not_internet_accessible": "Your Home Assistant instance needs to be accessible from the internet to receive Twilio messages."
},
"create_entry": {
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/helpers/config_entry_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ async def async_step_user(
) -> Dict[str, Any]:
"""Handle a user initiated set up flow to create a webhook."""
if not self._allow_multiple and self._async_current_entries():
return self.async_abort(reason="one_instance_allowed")
return self.async_abort(reason="single_instance_allowed")
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 didn't see that you're changing this string. Then it's ok to do all integrations in one PR for this string.


if user_input is None:
return self.async_show_form(step_id="user")
Expand Down
2 changes: 1 addition & 1 deletion tests/components/islamic_prayer_times/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ async def test_integration_already_configured(hass):
)

assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
assert result["reason"] == "one_instance_allowed"
assert result["reason"] == "single_instance_allowed"
4 changes: 2 additions & 2 deletions tests/components/owntracks/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ async def test_abort_if_already_setup(hass):
# Should fail, already setup (import)
result = await flow.async_step_import({})
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
assert result["reason"] == "one_instance_allowed"
assert result["reason"] == "single_instance_allowed"

# Should fail, already setup (flow)
result = await flow.async_step_user({})
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
assert result["reason"] == "one_instance_allowed"
assert result["reason"] == "single_instance_allowed"


async def test_user_not_supports_encryption(hass, not_supports_encryption):
Expand Down
2 changes: 1 addition & 1 deletion tests/components/ozw/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ async def test_one_instance_allowed(hass):
DOMAIN, context={"source": config_entries.SOURCE_USER}
)
assert result["type"] == "abort"
assert result["reason"] == "one_instance_allowed"
assert result["reason"] == "single_instance_allowed"
2 changes: 1 addition & 1 deletion tests/components/speedtestdotnet/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,4 @@ async def test_integration_already_configured(hass):
speedtestdotnet.DOMAIN, context={"source": "user"}
)
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
assert result["reason"] == "one_instance_allowed"
assert result["reason"] == "single_instance_allowed"
2 changes: 1 addition & 1 deletion tests/helpers/test_config_entry_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ async def test_webhook_single_entry_allowed(hass, webhook_flow_conf):
result = await flow.async_step_user()

assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
assert result["reason"] == "one_instance_allowed"
assert result["reason"] == "single_instance_allowed"


async def test_webhook_multiple_entries_allowed(hass, webhook_flow_conf):
Expand Down