mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
Migrate uptime to use single_config_entry (#114586)
This commit is contained in:
parent
f2b9e6b389
commit
e14573a465
@ -20,9 +20,6 @@ class UptimeConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
self, user_input: dict[str, Any] | None = None
|
self, user_input: dict[str, Any] | None = None
|
||||||
) -> ConfigFlowResult:
|
) -> ConfigFlowResult:
|
||||||
"""Handle a flow initialized by the user."""
|
"""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:
|
if user_input is not None:
|
||||||
return self.async_create_entry(
|
return self.async_create_entry(
|
||||||
title="Uptime",
|
title="Uptime",
|
||||||
|
@ -6,5 +6,6 @@
|
|||||||
"documentation": "https://www.home-assistant.io/integrations/uptime",
|
"documentation": "https://www.home-assistant.io/integrations/uptime",
|
||||||
"integration_type": "service",
|
"integration_type": "service",
|
||||||
"iot_class": "local_push",
|
"iot_class": "local_push",
|
||||||
"quality_scale": "internal"
|
"quality_scale": "internal",
|
||||||
|
"single_config_entry": true
|
||||||
}
|
}
|
||||||
|
@ -5,9 +5,6 @@
|
|||||||
"user": {
|
"user": {
|
||||||
"description": "[%key:common::config_flow::description::confirm_setup%]"
|
"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": {
|
"uptime": {
|
||||||
"integration_type": "service",
|
"integration_type": "service",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"iot_class": "local_push"
|
"iot_class": "local_push",
|
||||||
|
"single_config_entry": true
|
||||||
},
|
},
|
||||||
"uptimerobot": {
|
"uptimerobot": {
|
||||||
"name": "UptimeRobot",
|
"name": "UptimeRobot",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user