mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 12:45:28 +02:00
Add ability to pass integration domain to report_usage (#130705)
* Add ability to pass integration domain to report_usage * Adjust * Fix * Add tests * Update test_frame.py * Update test_frame.py * Update test_frame.py * Update test_frame.py * Update test_frame.py * Update test_frame.py * Finish tests * Docstring * Replace logger warning with report_usage * Improve * docstring * Improve tests * Adjust docstring for exclude_integrations * Fix behavior and improve tests
This commit is contained in:
@@ -2887,18 +2887,12 @@ class ConfigFlow(ConfigEntryBaseFlow):
|
||||
) -> ConfigFlowResult:
|
||||
"""Finish config flow and create a config entry."""
|
||||
if self.source in {SOURCE_REAUTH, SOURCE_RECONFIGURE}:
|
||||
report_issue = async_suggest_report_issue(
|
||||
self.hass, integration_domain=self.handler
|
||||
)
|
||||
_LOGGER.warning(
|
||||
(
|
||||
"Detected %s config flow creating a new entry, "
|
||||
"when it is expected to update an existing entry and abort. "
|
||||
"This will stop working in %s, please %s"
|
||||
),
|
||||
self.source,
|
||||
"2025.11",
|
||||
report_issue,
|
||||
report_usage(
|
||||
f"creates a new entry in a '{self.source}' flow, "
|
||||
"when it is expected to update an existing entry and abort",
|
||||
core_behavior=ReportBehavior.LOG,
|
||||
breaks_in_ha_version="2025.11",
|
||||
integration_domain=self.handler,
|
||||
)
|
||||
result = super().async_create_entry(
|
||||
title=title,
|
||||
|
Reference in New Issue
Block a user