# config_flow.connection_test

> **Generated from `RuleDefinition` metadata.** Edit only the section below the
> "HANDWRITTEN BELOW" marker; everything above is regenerated by
> `hasscheck docs-render`.

## Summary

config_flow.py tests the connection before creating the entry

## Why

Testing the connection during setup gives users immediate feedback when credentials or network settings are wrong, preventing broken config entries. Note: this rule uses a heuristic — it checks whether any discovery-flow step (async_step_user, async_step_zeroconf, etc.) awaits a call that is not pure flow plumbing (async_show_form, async_create_entry, etc.). False negatives are possible if connection logic lives in a helper called without await.

## Status behavior

| Field | Value |
|---|---|
| Category | modern_ha_patterns |
| Severity | recommended |
| Overridable | True |
| Version | 1.0.0 |

## Source

- https://developers.home-assistant.io/docs/config_entries_config_flow_handler/#defining-the-flow
- `source_checked_at`: 2026-05-01

<!-- HANDWRITTEN BELOW THIS LINE -->
