Skip to content

Commit

Permalink
Use single_config_entry in Accuweather manifest (home-assistant#111548
Browse files Browse the repository at this point in the history
)

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
  • Loading branch information
bieniu and bieniu authored Mar 13, 2024
1 parent 8bc3286 commit 3d9a9c3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
5 changes: 0 additions & 5 deletions homeassistant/components/accuweather/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ async def async_step_user(
self, user_input: dict[str, Any] | None = None
) -> ConfigFlowResult:
"""Handle a flow initialized by the user."""
# Under the terms of use of the API, one user can use one free API key. Due to
# the small number of requests allowed, we only allow one integration instance.
if self._async_current_entries():
return self.async_abort(reason="single_instance_allowed")

errors = {}

if user_input is not None:
Expand Down
3 changes: 2 additions & 1 deletion homeassistant/components/accuweather/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"iot_class": "cloud_polling",
"loggers": ["accuweather"],
"quality_scale": "platinum",
"requirements": ["accuweather==2.1.1"]
"requirements": ["accuweather==2.1.1"],
"single_config_entry": true
}
3 changes: 0 additions & 3 deletions homeassistant/components/accuweather/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"invalid_api_key": "[%key:common::config_flow::error::invalid_api_key%]",
"requests_exceeded": "The allowed number of requests to Accuweather API has been exceeded. You have to wait or change API Key."
},
"abort": {
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]"
}
},
"entity": {
Expand Down
3 changes: 2 additions & 1 deletion homeassistant/generated/integrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"name": "AccuWeather",
"integration_type": "service",
"config_flow": true,
"iot_class": "cloud_polling"
"iot_class": "cloud_polling",
"single_config_entry": true
},
"acer_projector": {
"name": "Acer Projector",
Expand Down

0 comments on commit 3d9a9c3

Please sign in to comment.