-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Deprecate hass argument in service helpers #2688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughAdds a blog post deprecating the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
blog/2025-06-03-deprecate-verify-domain-control.md (4)
12-14: Convert bare URL to a markdown link and add missing determiner
Replace the bare URL with a named link and insert "the" before thehassobject.- Since release `2025.1` (via core PR https://github.com/home-assistant/core/pull/133062), - a reference to `HomeAssistant` is available as a property of the `ServiceCall` object, - and it became redundant to pass `hass` object to `verify_domain_control`. + Since release `2025.1` (via core PR [#133062](https://github.com/home-assistant/core/pull/133062)), + a reference to `HomeAssistant` is available as a property of the `ServiceCall` object, + and it became redundant to pass the `hass` object to `verify_domain_control`.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
12-12: Bare URL used
null(MD034, no-bare-urls)
16-19: Refine step-by-step instructions for clarity and consistency
Front the goal before the location phrase, remove filler words, and ensure each item ends with a period.- To update your integration: - 1. Replace the decorator as shown in the first example below - 2. (Optional) Move the nested functions to be module-level as shown in the second example below - 3. Test the changes + To update your integration: + 1. Replace the decorator in the first example below. + 2. Move the nested functions to module-level in the second example below. (Optional) + 3. Test the changes.
26-26: Add missing determiner and remove fluff
Insert "The" at the start and drop "simply" for a more authoritative tone.- Minimum change is to simply adjust the decorator + The minimum change is to adjust the decorator.
46-46: Use direct authoritative phrasing and front the goal
Replace recommendation phrasing with a command that starts with the goal.- To reduce code complexity, it is now recommended to move the service functions to be module-level functions + Move the service functions to module-level functions to reduce code complexity.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
blog/2025-06-03-deprecate-verify-domain-control.md(1 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
`*/**(html|markdown|md)`: - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure t...
*/**(html|markdown|md): - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure the goal of the instruction is fronted.
- Apply the Microsoft Style Guide to ensure documentation maintains clarity and conciseness.
- In step-by-step instructions, front the location phrase in the instructional sentence.
- In step-by-step instructions, front the 'goal' in the instructional sentence.
- In step-by-step instructions, if in doubt what to front, front the 'goal' before the location phrase in the instructional sentence.
- do not hyphenate terms like 'top-right' or 'bottom-left' with 'corner'
blog/2025-06-03-deprecate-verify-domain-control.md
`*/**(html|markdown|md)`: - Use bold to mark UI strings. - If "" are used to mark UI strings, replace them by bold.
*/**(html|markdown|md): - Use bold to mark UI strings.
- If "" are used to mark UI strings, replace them by bold.
blog/2025-06-03-deprecate-verify-domain-control.md
`*/**(html|markdown|md)`: - Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"
*/**(html|markdown|md): - Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"
blog/2025-06-03-deprecate-verify-domain-control.md
`*/**(html|markdown|md)`: - Use sentence-style capitalization also in headings.
*/**(html|markdown|md): - Use sentence-style capitalization also in headings.
blog/2025-06-03-deprecate-verify-domain-control.md
`*/**(html|markdown|md)`: do not comment on HTML used for icons
*/**(html|markdown|md): do not comment on HTML used for icons
blog/2025-06-03-deprecate-verify-domain-control.md
`*/**(html|markdown|md)`: Avoid flagging inline HTML for embedding videos in future reviews for this repository.
*/**(html|markdown|md): Avoid flagging inline HTML for embedding videos in future reviews for this repository.
blog/2025-06-03-deprecate-verify-domain-control.md
🪛 LanguageTool
blog/2025-06-03-deprecate-verify-domain-control.md
[uncategorized] ~25-~25: A determiner appears to be missing. Consider inserting it.
Context: ... Home Assistant 2026.7. ### Examples Minimum change is to simply adjust the decorato...
(AI_EN_LECTOR_MISSING_DETERMINER)
🪛 markdownlint-cli2 (0.17.2)
blog/2025-06-03-deprecate-verify-domain-control.md
12-12: Bare URL used
null
(MD034, no-bare-urls)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Redirect rules - developers-home-assistant
- GitHub Check: Header rules - developers-home-assistant
- GitHub Check: Pages changed - developers-home-assistant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
blog/2025-06-03-deprecate-verify-domain-control.md (1)
17-19: Front goal in step-by-step instructionsAlign with step-by-step guidelines by fronting the goal before details and using an authoritative tone. For example:
-1. Replace the decorator as shown in the first example below -2. (Optional) Move the nested functions to be module-level as shown in the second example below -3. Test the changes +1. Update the decorator by replacing `@verify_domain_control(hass, DOMAIN)` with `@verify_domain_entity_control(DOMAIN)` +2. Refactor nested service handler functions to module level as shown in the second example (optional) +3. Test service calls to ensure the integration functions correctly
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
blog/2025-06-03-deprecate-verify-domain-control.md(1 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
`*/**(html|markdown|md)`: - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure t...
*/**(html|markdown|md): - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure the goal of the instruction is fronted.
- Apply the Microsoft Style Guide to ensure documentation maintains clarity and conciseness.
- In step-by-step instructions, front the location phrase in the instructional sentence.
- In step-by-step instructions, front the 'goal' in the instructional sentence.
- In step-by-step instructions, if in doubt what to front, front the 'goal' before the location phrase in the instructional sentence.
- do not hyphenate terms like 'top-right' or 'bottom-left' with 'corner'
blog/2025-06-03-deprecate-verify-domain-control.md
`*/**(html|markdown|md)`: - Use bold to mark UI strings. - If "" are used to mark UI strings, replace them by bold.
*/**(html|markdown|md): - Use bold to mark UI strings.
- If "" are used to mark UI strings, replace them by bold.
blog/2025-06-03-deprecate-verify-domain-control.md
`*/**(html|markdown|md)`: - Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"
*/**(html|markdown|md): - Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"
blog/2025-06-03-deprecate-verify-domain-control.md
`*/**(html|markdown|md)`: - Use sentence-style capitalization also in headings.
*/**(html|markdown|md): - Use sentence-style capitalization also in headings.
blog/2025-06-03-deprecate-verify-domain-control.md
`*/**(html|markdown|md)`: do not comment on HTML used for icons
*/**(html|markdown|md): do not comment on HTML used for icons
blog/2025-06-03-deprecate-verify-domain-control.md
`*/**(html|markdown|md)`: Avoid flagging inline HTML for embedding videos in future reviews for this repository.
*/**(html|markdown|md): Avoid flagging inline HTML for embedding videos in future reviews for this repository.
blog/2025-06-03-deprecate-verify-domain-control.md
🪛 LanguageTool
blog/2025-06-03-deprecate-verify-domain-control.md
[uncategorized] ~25-~25: A determiner appears to be missing. Consider inserting it.
Context: ... Home Assistant 2026.7. ### Examples Minimum change is to simply adjust the decorato...
(AI_EN_LECTOR_MISSING_DETERMINER)
🪛 markdownlint-cli2 (0.17.2)
blog/2025-06-03-deprecate-verify-domain-control.md
12-12: Bare URL used
null
(MD034, no-bare-urls)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Redirect rules - developers-home-assistant
- GitHub Check: Header rules - developers-home-assistant
- GitHub Check: Pages changed - developers-home-assistant
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
blog/2025-06-03-deprecate-verify-domain-control.md (3)
17-19: Add missing periods to list items.Each numbered item is a complete sentence and should end with a period for consistency with the Microsoft Style Guide.
Apply this diff:
-1. Replace the decorator as shown in the first example below +1. Replace the decorator as shown in the first example below. -2. (Optional) Move the nested functions to be module-level as shown in the second example below +2. (Optional) Move the nested functions to be module-level as shown in the second example below. -3. Test the changes +3. Test the changes.
26-27: Use imperative phrasing for the minimal change introduction.Front the goal and use the imperative mood to match step-by-step style:
-Minimum change is to simply adjust the decorator +For minimal change, adjust the decorator as follows:
47-48: Rephrase recommendation to imperative tone.Change the passive recommendation to an imperative instruction:
-To reduce code complexity, it is now recommended to move the service functions to be module-level functions +Reduce code complexity by moving service functions to module-level functions.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
blog/2025-06-03-deprecate-verify-domain-control.md(1 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
`*/**(html|markdown|md)`: - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure t...
*/**(html|markdown|md): - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure the goal of the instruction is fronted.
- Apply the Microsoft Style Guide to ensure documentation maintains clarity and conciseness.
- In step-by-step instructions, front the location phrase in the instructional sentence.
- In step-by-step instructions, front the 'goal' in the instructional sentence.
- In step-by-step instructions, if in doubt what to front, front the 'goal' before the location phrase in the instructional sentence.
- do not hyphenate terms like 'top-right' or 'bottom-left' with 'corner'
blog/2025-06-03-deprecate-verify-domain-control.md
`*/**(html|markdown|md)`: - Use bold to mark UI strings. - If "" are used to mark UI strings, replace them by bold.
*/**(html|markdown|md): - Use bold to mark UI strings.
- If "" are used to mark UI strings, replace them by bold.
blog/2025-06-03-deprecate-verify-domain-control.md
`*/**(html|markdown|md)`: - Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"
*/**(html|markdown|md): - Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"
blog/2025-06-03-deprecate-verify-domain-control.md
`*/**(html|markdown|md)`: - Use sentence-style capitalization also in headings.
*/**(html|markdown|md): - Use sentence-style capitalization also in headings.
blog/2025-06-03-deprecate-verify-domain-control.md
`*/**(html|markdown|md)`: do not comment on HTML used for icons
*/**(html|markdown|md): do not comment on HTML used for icons
blog/2025-06-03-deprecate-verify-domain-control.md
`*/**(html|markdown|md)`: Avoid flagging inline HTML for embedding videos in future reviews for this repository.
*/**(html|markdown|md): Avoid flagging inline HTML for embedding videos in future reviews for this repository.
blog/2025-06-03-deprecate-verify-domain-control.md
🪛 LanguageTool
blog/2025-06-03-deprecate-verify-domain-control.md
[uncategorized] ~25-~25: A determiner appears to be missing. Consider inserting it.
Context: ... Home Assistant 2026.7. ### Examples Minimum change is to simply adjust the decorato...
(AI_EN_LECTOR_MISSING_DETERMINER)
🔇 Additional comments (1)
blog/2025-06-03-deprecate-verify-domain-control.md (1)
7-15: LGTM: Summary is clear and concise.The “Summary of changes” section succinctly explains the deprecation and replacement, uses direct tone, and follows sentence-style capitalization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
A blog post announcing the deprecation of the verify_domain_control service helper and guiding integrators on migrating to the new verify_domain_entity_control helper in Home Assistant.
- Deprecation announcement for
verify_domain_controland replacement withverify_domain_entity_control - Migration steps and timeline for removal (2026.7)
- Code examples illustrating decorator update and module-level function refactoring
Co-authored-by: Copilot <[email protected]>
|
Marked as draft until core PR is accepted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (4)
blog/2025-09-22-deprecate-hass-argument-service-helpers.md (4)
9-11: Fix typo and tighten the deprecation sentence.Spelling: “Provinding” → “Providing”. Also restructure for clarity and style.
-Provinding `hass` argument to the `verify_domain_control`, `extract_entity_ids`, `async_extract_entities`, -`async_extract_entity_ids` or `async_extract_config_entry_ids` service helper is deprecated. +Providing the `hass` argument to the following service helpers is deprecated: +`verify_domain_control`, `extract_entity_ids`, `async_extract_entities`, +`async_extract_entity_ids`, and `async_extract_config_entry_ids`.
16-16: Use imperative, goal‑fronted instruction per style guide.Remove “just” and front the goal.
-To update your integration, just remove the `hass` argument. +Update your integration: remove the `hass` argument.
25-35: Normalize indentation in “New” code block for copy/paste.Unindent the “New” lines to match the “Old” example and avoid misleading extra indentation.
-# New - target_entry_ids = await async_extract_config_entry_ids(service_call) - entity_ids = await async_extract_entity_ids(service_call) - entities = await service.async_extract_entities(platform_entities.values(), service_call) +# New +target_entry_ids = await async_extract_config_entry_ids(service_call) +entity_ids = await async_extract_entity_ids(service_call) +entities = await service.async_extract_entities(platform_entities.values(), service_call)
39-49: Align decorator example indentation.Match indentation across examples.
- @verify_domain_control(DOMAIN) - async def do_action(call: ServiceCall) -> None: - ... +@verify_domain_control(DOMAIN) +async def do_action(call: ServiceCall) -> None: + ...
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
blog/2025-09-22-deprecate-hass-argument-service-helpers.md(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
*/**(html|markdown|md)
⚙️ CodeRabbit configuration file
*/**(html|markdown|md): - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure the goal of the instruction is fronted.
- Apply the Microsoft Style Guide to ensure documentation maintains clarity and conciseness.
- In step-by-step instructions, front the location phrase in the instructional sentence.
- In step-by-step instructions, front the 'goal' in the instructional sentence.
- In step-by-step instructions, if in doubt what to front, front the 'goal' before the location phrase in the instructional sentence.
- do not hyphenate terms like 'top-right' or 'bottom-left' with 'corner'
*/**(html|markdown|md): - Use bold to mark UI strings.
If "" are used to mark UI strings, replace them by bold.
Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"
Use sentence-style capitalization also in headings.
do not comment on HTML used for icons
Avoid flagging inline HTML for embedding videos in future reviews for this repository.
Files:
blog/2025-09-22-deprecate-hass-argument-service-helpers.md
🔇 Additional comments (1)
blog/2025-09-22-deprecate-hass-argument-service-helpers.md (1)
12-15: Use core PR #133062 (2025.1); PR #146057 is unrelated.PR #133062 (merged Dec 13, 2024) introduced the ServiceCall.hass property — update the text to reference that PR and the 2025.1 release. (github.com)
Suggested wording:
Starting in 2025.1 (core PR #133062), ServiceCall exposes a HomeAssistant reference (service_call.hass), which makes the extra hass parameter to these helpers redundant.Likely an incorrect or invalid review comment.
|
|
||
| To update your integration, just remove the `hass` argument. | ||
|
|
||
| Support for the `hass` argument will be removed in Home Assistant 2026.10. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Confirm removal version.
Validate that removal is scheduled for 2026.10 for all helpers listed and aligns with Core deprecation policy.
🌐 Web query:
Confirm deprecation removal date for passing `hass` to service helpers (verify_domain_control, extract_entity_ids, async_extract_entities, async_extract_entity_ids, async_extract_config_entry_ids).
site:developers.home-assistant.io/blog deprecate "service helpers" hass
site:github.com/home-assistant/core "verify_domain_control" "extract_entity_ids" deprecate
💡 Result:
Confirmed: Home Assistant deprecated use of hass.helpers and extended the removal — hass.helpers (including helper functions accessed via hass.helpers such as service helpers) will be removed in Home Assistant 2025.5 (May 2025). [1]
Source:
- Home Assistant Developer Blog — "Extend deprecation period of hass.helpers" (announces removal starting with Home Assistant 2025.5). [1]
Update removal version to Home Assistant 2025.5 (May 2025).
Confirmed: removal of hass.helpers (including verify_domain_control, extract_entity_ids, async_extract_entities, async_extract_entity_ids, async_extract_config_entry_ids) is scheduled for Home Assistant 2025.5 (May 2025). The post currently states 2026.10 — update blog/2025-09-22-deprecate-hass-argument-service-helpers.md (line 18) to reflect 2025.5 and link the official deprecation announcement.
🤖 Prompt for AI Agents
In blog/2025-09-22-deprecate-hass-argument-service-helpers.md around line 18,
update the removal version text from "Home Assistant 2026.10" to "Home Assistant
2025.5 (May 2025)" and add a link to the official deprecation announcement;
replace the single sentence so it reads that support for the `hass` argument
will be removed in Home Assistant 2025.5 (May 2025) and append the URL to the
official deprecation announcement for reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry coderabbitai, I think your suggestion in this case is plain wrong!
We want a one-year deprecation so 2026.10 is correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@epenet You're absolutely right, and I apologize for the incorrect suggestion!
A one-year deprecation period from the blog post date (2025-09-22) would indeed result in removal around 2026.10, making the current version in the documentation correct. Thank you for the clarification - no changes are needed to the removal timeline in the blog post.
Proposed change
Blog post for home-assistant/core#147946 and home-assistant/core#152738
Type of change
Checklist
Additional information
Summary by CodeRabbit