Migrate uptime to use single_config_entry (#114586)
This commit is contained in:
parent
f2b9e6b389
commit
e14573a465
4 changed files with 4 additions and 8 deletions
|
@ -20,9 +20,6 @@ class UptimeConfigFlow(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="Uptime",
|
||||
|
|
|
@ -6,5 +6,6 @@
|
|||
"documentation": "https://www.home-assistant.io/integrations/uptime",
|
||||
"integration_type": "service",
|
||||
"iot_class": "local_push",
|
||||
"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%]"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6472,7 +6472,8 @@
|
|||
"uptime": {
|
||||
"integration_type": "service",
|
||||
"config_flow": true,
|
||||
"iot_class": "local_push"
|
||||
"iot_class": "local_push",
|
||||
"single_config_entry": true
|
||||
},
|
||||
"uptimerobot": {
|
||||
"name": "UptimeRobot",
|
||||
|
|
Loading…
Add table
Reference in a new issue