Migrate moon to use single_config_entry (#114404)
parent
3fd24989c6
commit
7d0437808a
|
@ -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={})
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -3720,7 +3720,8 @@
|
|||
"moon": {
|
||||
"integration_type": "service",
|
||||
"config_flow": true,
|
||||
"iot_class": "calculated"
|
||||
"iot_class": "calculated",
|
||||
"single_config_entry": true
|
||||
},
|
||||
"mopeka": {
|
||||
"name": "Mopeka",
|
||||
|
|
Loading…
Reference in New Issue