[tuya] Document wifi_reset, on_wifi_reset and on_wifi_select#6711
[tuya] Document wifi_reset, on_wifi_reset and on_wifi_select#6711dshcherb wants to merge 33 commits into
Conversation
Co-authored-by: J. Nick Koston <nick@home-assistant.io> Co-authored-by: J. Nick Koston <nick@koston.org> Co-authored-by: luar123 <49960470+luar123@users.noreply.github.com>
…home#6656) Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: tomaszduda23 <tomaszduda23@gmail.com>
There was a problem hiding this comment.
As this is a feature matched with a PR in https://github.com/esphome/esphome, please target your PR to the next branch and rebase.
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
✅ Deploy Preview for esphome ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (37)
WalkthroughDocumentation and site metadata are updated across the site: repository/package/workflow references switch to esphome.io; Starlight edit links and version.yaml adjusted; CONTRIBUTING/README updated; many changelog entries' PR links normalized to esphome.io; and multiple component docs (Tuya, light, NeoPixelBus, RP2040, time, web_server, speaker, LVGL, etc.) gain clarifications, new fields/options, or new automation/action documentation. ChangesRepository & Site Metadata
Changelogs
Component and Guide Documentation
🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers:
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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.
🧹 Nitpick comments (1)
src/content/docs/components/tuya.mdx (1)
159-165: ⚡ Quick winMake
wifi_reset: falseexplicit in this example.The paragraph explicitly calls out
wifi_reset: false, but the snippet currently relies on the default. Adding it explicitly will reduce ambiguity for readers copying this block.Proposed doc tweak
tuya: + wifi_reset: false on_wifi_reset: - lambda: App.safe_reboot(); on_wifi_select: - lambda: App.safe_reboot();🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/content/docs/components/tuya.mdx` around lines 159 - 165, The YAML example under the tuya block currently shows on_wifi_reset and on_wifi_select handlers but omits the explicit wifi_reset setting; update the snippet so it includes wifi_reset: false at the tuya root (alongside the existing on_wifi_reset and on_wifi_select keys) so readers see the explicit setting instead of relying on the default.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/content/docs/components/tuya.mdx`:
- Around line 159-165: The YAML example under the tuya block currently shows
on_wifi_reset and on_wifi_select handlers but omits the explicit wifi_reset
setting; update the snippet so it includes wifi_reset: false at the tuya root
(alongside the existing on_wifi_reset and on_wifi_select keys) so readers see
the explicit setting instead of relying on the default.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ca825dbb-a646-47ec-be82-0280986eb984
📒 Files selected for processing (1)
src/content/docs/components/tuya.mdx
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: guillempages <guillempages@users.noreply.github.com>
There was a problem hiding this comment.
As this is a feature matched with a PR in https://github.com/esphome/esphome, please target your PR to the next branch and rebase.
|
Closed in favor of #6712 |
Description
Add documentation for the new
wifi_reset,on_wifi_reset, andon_wifi_selectconfiguration options added to the Tuya MCU component.When a Tuya MCU device has a physical button, long-pressing it triggers the MCU to send WIFI_RESET (0x04, EZ pairing) or WIFI_SELECT (0x05, AP pairing) commands to the WiFi module. Previously, ESPHome only acknowledged these commands and sent a fake WIFI_STATE progression to satisfy the MCU - no actual reset or pairing occurred.
The new options allow:
wifi_reset: true- clear saved WiFi credentials and reboot when the MCU sends a reset commandon_wifi_reset/on_wifi_select- automation triggers for custom logic (e.g., reboot without clearing credentials, notify Home Assistant, turn off relays before reset)Related issue (if applicable):
Pull request in esphome with YAML changes (if applicable):
Checklist
I am merging into
nextbecause this is new documentation that has a matching pull-request in esphome as linked above.or
I am merging into
currentbecause this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.Link added in
/src/content/docs/components/index.mdxwhen creating new documents for new components or cookbook.