Adding heated towel radiator element, AFD02#703
Conversation
(10 for 1 hour, 15 for 90 minutes etc) so it seems like minutes is the easiest representation to expose. It only accepts 30 minute increments so we can enforce that also
|
Hey @mintsoft! Thanks for contributing this — always great to see new device support for TinyTuya. 🎉 I reviewed the code and found a few things: 🔴 Syntax error (line 130)if delay % 30 != 0
returnMissing colon — should be 🟡 Mode mismatch in
|
|
Thanks @mintsoft — looks much cleaner now! 🎉 Both issues resolved:
The code looks good to me. Passing it to @jasonacox for final review and merge. |
There was a problem hiding this comment.
Pull request overview
Adds a new community Contrib device module for a Tuya heated towel rail element (AFD02 / 102HET-RB02WF) and documents its usage in the Contrib README.
Changes:
- Introduce
TowelRailHeaterDevicewith DPS mappings and helpers for temperature, mode, and timer control (default protocol version 3.4). - Extend
tinytuya/Contrib/README.mdwith device description, mode mapping notes, and a usage example. - Minor README formatting tweak (language-tagged code fence) around the WiFiDualMeter example.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| tinytuya/Contrib/TowelRailHeaterDevice.py | New device wrapper class providing typed-ish accessors/mutators for towel rail heater DPS. |
| tinytuya/Contrib/README.md | Adds documentation and sample code for the new Contrib device. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks @mintsoft ! |
The device I have is known as the AFD02 inside the SmartLife app, I've seen it also go by "102HET-RB02WF" for some reason.
I have been unable to find any documentation the Tuya DPS anywhere so it has been guessed-at by playing around with mine.