Migrate nina to use single_config_entry (#114408)

This commit is contained in:
Jan-Philipp Benecke 2024-03-28 23:05:47 +01:00 committed by GitHub
parent 7d0437808a
commit 4adbf7c730
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 8 deletions

View File

@ -107,9 +107,6 @@ class NinaConfigFlow(ConfigFlow, domain=DOMAIN):
"""Handle the initial step.""" """Handle the initial step."""
errors: dict[str, Any] = {} errors: dict[str, Any] = {}
if self._async_current_entries():
return self.async_abort(reason="single_instance_allowed")
if not self._all_region_codes_sorted: if not self._all_region_codes_sorted:
nina: Nina = Nina(async_get_clientsession(self.hass)) nina: Nina = Nina(async_get_clientsession(self.hass))

View File

@ -6,5 +6,6 @@
"documentation": "https://www.home-assistant.io/integrations/nina", "documentation": "https://www.home-assistant.io/integrations/nina",
"iot_class": "cloud_polling", "iot_class": "cloud_polling",
"loggers": ["pynina"], "loggers": ["pynina"],
"requirements": ["PyNINA==0.3.3"] "requirements": ["PyNINA==0.3.3"],
"single_config_entry": true
} }

View File

@ -15,9 +15,6 @@
} }
} }
}, },
"abort": {
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]"
},
"error": { "error": {
"no_selection": "Please select at least one city/county", "no_selection": "Please select at least one city/county",
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]", "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",

View File

@ -3998,7 +3998,8 @@
"name": "NINA", "name": "NINA",
"integration_type": "hub", "integration_type": "hub",
"config_flow": true, "config_flow": true,
"iot_class": "cloud_polling" "iot_class": "cloud_polling",
"single_config_entry": true
}, },
"nissan_leaf": { "nissan_leaf": {
"name": "Nissan Leaf", "name": "Nissan Leaf",