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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing broken integration loading #87

Merged
merged 2 commits into from
Feb 1, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions custom_components/magic_areas/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):

async def async_step_user(self, user_input=None):
"""Handle the initial step."""

if user_input is not None:
await self.async_set_unique_id(user_input[CONF_NAME])
self._abort_if_unique_id_configured()
return self.async_create_entry(title=user_input[CONF_NAME], data=user_input)

return self.async_abort(reason="not_supported")

async def async_step_import(self, user_input=None):
Expand Down
2 changes: 1 addition & 1 deletion custom_components/magic_areas/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "magic_areas",
"name": "Magic Areas",
"version": "2.0.2",
"version": "2.0.3",
"documentation": "https://github.com/jseidl/magic-areas",
"dependencies": [],
"after_dependencies": ["template", "group", "binary_sensor", "sensor", "light", "media_player", "device_tracker", "discovery", "camera"],
Expand Down
8 changes: 7 additions & 1 deletion custom_components/magic_areas/translations/en.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{
"title": "Magic Areas",
"config": {
"step": {},
"step": {
"init": {
"title": "Magic Areas",
"description": "This integration is automatically configured on load. You don't need to manually add the integration on this UI. Your Magic Areas should be already on the integrations page. Use Home Assistant's built-in areas to create new ones and manage entities.",
"data": {}
}
},
"abort": {
"not_supported": "This integration is automatically configured on load. You don't need to manually add the integration on this UI. Your Magic Areas should be already on the integrations page. Use Home Assistant's built-in areas to create new ones and manage entities."
}
Expand Down