Migrate nina to use single_config_entry (#114408)

pull/114215/head^2
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."""
errors: dict[str, Any] = {}
if self._async_current_entries():
return self.async_abort(reason="single_instance_allowed")
if not self._all_region_codes_sorted:
nina: Nina = Nina(async_get_clientsession(self.hass))

View File

@ -6,5 +6,6 @@
"documentation": "https://www.home-assistant.io/integrations/nina",
"iot_class": "cloud_polling",
"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": {
"no_selection": "Please select at least one city/county",
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",

View File

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