Migrate moon to use single_config_entry (#114404)

pull/114409/head
Jan-Philipp Benecke 2024-03-28 21:28:02 +01:00 committed by GitHub
parent 3fd24989c6
commit 7d0437808a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 8 deletions

View File

@ -18,9 +18,6 @@ class MoonConfigFlow(ConfigFlow, domain=DOMAIN):
self, user_input: dict[str, Any] | None = None
) -> ConfigFlowResult:
"""Handle a flow initialized by the user."""
if self._async_current_entries():
return self.async_abort(reason="single_instance_allowed")
if user_input is not None:
return self.async_create_entry(title=DEFAULT_NAME, data={})

View File

@ -6,5 +6,6 @@
"documentation": "https://www.home-assistant.io/integrations/moon",
"integration_type": "service",
"iot_class": "calculated",
"quality_scale": "internal"
"quality_scale": "internal",
"single_config_entry": true
}

View File

@ -5,9 +5,6 @@
"user": {
"description": "[%key:common::config_flow::description::confirm_setup%]"
}
},
"abort": {
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]"
}
},
"entity": {

View File

@ -3720,7 +3720,8 @@
"moon": {
"integration_type": "service",
"config_flow": true,
"iot_class": "calculated"
"iot_class": "calculated",
"single_config_entry": true
},
"mopeka": {
"name": "Mopeka",