Skip to content

Conversation

@epenet
Copy link
Contributor

@epenet epenet commented Dec 9, 2025

Proposed change

The current code sample places all the code as a nested function in async_setup

This is ok when the service function is small, but if the function is complex or there are multiple services it becomes quite difficult to follow.

This aims to improve code clarity and separation of concern.

Also update common-pattern IQS rule to match

Type of change

  • Document existing features within Home Assistant
  • Document new or changing features for which there is an existing pull request elsewhere
  • Spelling or grammatical corrections, or rewording for improved clarity
  • Changes to the backend of this documentation
  • Remove stale or deprecated documentation

Checklist

  • I have read and followed the documentation guidelines.
  • I have verified that my changes render correctly in the documentation.

Additional information

  • This PR fixes or closes issue: fixes #
  • Link to relevant existing code or pull request:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants