Migrate uptime to use single_config_entry (#114586)

This commit is contained in:
Jan-Philipp Benecke 2024-04-01 23:33:29 +02:00 committed by GitHub
parent f2b9e6b389
commit e14573a465
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 8 deletions

View file

@ -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",

View file

@ -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
}

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%]"
}
}
}

View file

@ -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",