Skip to content

Update light.md to mention toggle support#2986

Open
ams2990 wants to merge 2 commits intohome-assistant:masterfrom
ams2990:patch-1
Open

Update light.md to mention toggle support#2986
ams2990 wants to merge 2 commits intohome-assistant:masterfrom
ams2990:patch-1

Conversation

@ams2990
Copy link

@ams2990 ams2990 commented Mar 8, 2026

Also fix a missing block quote close.

Proposed change

Update light documentation to match home-assistant/core#156196.

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

Summary by CodeRabbit

  • Documentation
    • Added new "Toggle Light Device" example for lights with async toggle method documentation
    • Added no-sync toggle tip for improved light control guidance

Also fix a missing block quote close.
@ams2990
Copy link
Author

ams2990 commented Mar 8, 2026

@arturpragacz

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 8, 2026

📝 Walkthrough

Walkthrough

Documentation update to the light entity file adds a new example demonstrating how to toggle light devices using an async_toggle method. The change includes a closing code fence correction and a tip for no-sync toggle behavior.

Changes

Cohort / File(s) Summary
Documentation
docs/core/entity/light.md
Added "Toggle Light Device" example section with async_toggle method implementation and no-sync toggle usage tip.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Update light.md to mention toggle support' directly relates to the main change of adding toggle support documentation to the light.md file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description follows the required template structure with all major sections completed, including proposed change, type of change selection, checklist items, and additional information with link to relevant core PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/core/entity/light.md`:
- Around line 174-187: The doc incorrectly states sync toggle isn't supported;
update the Toggle Light Device section for LightEntity to reflect that toggle()
is available (inherited from ToggleEntity) and show both sync and async variants
(toggle and async_toggle) or explicitly state toggle is inherited and recommend
implementing turn_on/turn_off instead; reference LightEntity, ToggleEntity,
toggle(), async_toggle(), turn_on, and turn_off so readers can find the
implementation points.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 43776e2b-e9a5-4be3-ac2f-9615a0394669

📥 Commits

Reviewing files that changed from the base of the PR and between 974c323 and 26d66df.

📒 Files selected for processing (1)
  • docs/core/entity/light.md

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.

1 participant