Add single_config_entry manifest option (#109505)

* Allow setting if we support multiple config entries in config flow

* Move property to config flow instead of flow handler

* Move marking an integration as single instance only to manifest

* Revert line remove

* Avoid init a config flow or adding a new entry on a single instance with an entry

* Revert changes in test

* Process code review comments

* Apply code review suggestion
This commit is contained in:
Jan-Philipp Benecke 2024-02-26 19:00:33 +01:00 committed by GitHub
parent 673a95227b
commit baf84b6fba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 233 additions and 2 deletions

View file

@ -191,6 +191,11 @@ def _generate_integrations(
if integration.iot_class:
metadata["iot_class"] = integration.iot_class
if single_config_entry := integration.manifest.get(
"single_config_entry"
):
metadata["single_config_entry"] = single_config_entry
if integration.integration_type == "helper":
result["helper"][domain] = metadata
else: