Universal Tuya docsHomeSupported devicesRequest a deviceFAQChangelogArchitectureKnowledge baseCreditsSourcesContributing

Lessons P3001–P3016 (2026-10-24, Europe/Paris)

Hand-written summary of why each fix was needed. The generated lessons.md keeps the commit subjects.

Pcommitlesson
P3001c1e1a036d7TRV variation bug (#560): 'radiator_valve'.includes('valve') sent TRVs to the water-valve DP map (DP2 = onoff, DP5 = countdown). Match driver families with exact ids or anchored regexes, never substrings.
P30021339653a06Double calibration: the offset was applied to measure_temperature and again to target_*, and once more by the device echo. Apply calibration exactly once, to the measured value only. ZCL /100: measuredValue is centi-degrees; divide once.
P3002b9e6cdb405aLint gates must stay green on every touched line (range guard braces).
P3010a79f4e36cdUpstream couples are added additively; a layout matcher using containsCI must not match prefixes of other models.
P3011d712f75028Unsupported guard: every 0x81/0x84/0x86/0xC3 outcome is cached per device (12 h memory, 7 d persisted) so we stop hammering devices, and unknown incoming commands become Flow triggers instead of silent default responses.
P3011–P3013f7dc12b775includesCI misuse: case-insensitive includes on manufacturer ids matched other couples at 6 sites. Use exact case-insensitive equality for ids.
P3014c019c743e1One driver per couple: a couple listed in two drivers pairs randomly. Remove the duplicate from the wrong driver and pin it with a test.
P3015d4fc5aabedCaseless duplicates: _TZE284_X and _tze284_x are the same couple; the duplicate gate must compare case-insensitively.
P3015bb905753f11A water valve listed in climate_sensor was removed; the test asserts no other holder.
P3016b57a979ef6Unknown interpreter: exact (spec/Z2M/ZHA) → family → heuristic, learning per device, Flow cards. Tongou DP6: TO-Q-SYS-JZT DP6 is an 8-byte V/I/P block, not phaseVariant2. Powbay 18-byte DP: three 6-byte phase blocks. Never guess a byte layout without a sample.
P3017(this change)Method chains for every capability, coverage matrix, teach/forget actions, TSN dedup, DP-name catalogue, user teach always wins over learned or exact guesses.

← Knowledge base index · source