Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

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 custom_components/pyscript/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ async def async_step_import(self, import_config: Dict[str, Any] = None) -> Dict[
self.hass.config_entries.async_update_entry(entry=entry, data=updated_data)
return self.async_abort(reason="updated_entry")

return self.async_abort(reason="already_configured_service")
return self.async_abort(reason="already_configured")

return await self.async_step_user(user_input=import_config)
4 changes: 2 additions & 2 deletions custom_components/pyscript/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
}
},
"abort": {
"already_configured_service": "[%key:common::config_flow::abort::already_configured_service%]",
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]",
"already_configured": "Already configured.",
"single_instance_allowed": "Already configured. Only a single configuration possible.",
"updated_entry": "This entry has already been setup but the configuration has been updated."
}
}
Expand Down
4 changes: 2 additions & 2 deletions custom_components/pyscript/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
}
},
"abort": {
"already_configured_service": "[%key:common::config_flow::abort::already_configured_service%]",
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]",
"already_configured": "Already configured.",
"single_instance_allowed": "Already configured. Only a single configuration possible.",
"updated_entry": "This entry has already been setup but the configuration has been updated."
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ async def test_import_flow_no_update(hass):
)

assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
assert result["reason"] == "already_configured_service"
assert result["reason"] == "already_configured"


async def test_import_flow_update_user(hass):
Expand Down