[Aqara] add Aqara Bath Heater T1#2942
Conversation
|
Duplicate profile check: Passed - no duplicate profiles detected. |
|
Invitation URL: |
Test Results 73 files 511 suites 0s ⏱️ Results for commit 86aba8c. ♻️ This comment has been updated with latest results. |
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against 86aba8c |
| HIGH = "high", | ||
| } | ||
| local MODE_TO_FAN = { [SPEED.LOW] = FAN_LOW, [SPEED.MEDIUM] = FAN_MID, [SPEED.HIGH] = FAN_HIGH } | ||
| local FAN_TO_MODE = { [0] = SPEED.LOW, [1] = SPEED.MEDIUM, [2] = SPEED.HIGH } |
There was a problem hiding this comment.
| local FAN_TO_MODE = { [0] = SPEED.LOW, [1] = SPEED.MEDIUM, [2] = SPEED.HIGH } | |
| local FAN_TO_MODE = { [FAN_LOW] = SPEED.LOW, [FAN_MID] = SPEED.MEDIUM, [FAN_HIGH] = SPEED.HIGH } |
nit: Keep them interlocked
There was a problem hiding this comment.
I have made the requested changes.
|
|
||
| if params.setpoint ~= nil then | ||
| local sp_raw = math.floor(clamp(params.setpoint, 16, 45) * 100) & 0xFFFF | ||
| hi32 = (sp_raw << 16) | (hi32 & 0xFFFF) |
There was a problem hiding this comment.
| hi32 = (sp_raw << 16) | (hi32 & 0xFFFF) | |
| hi32 = (sp_raw << 16) | 0xFFFF |
Since hi32 is unmodified from being set to 0xFFFFFFFF and (hi32 & 0xFFFF) will always evaluate to 0xFFFF
There was a problem hiding this comment.
The unnecessary computations have been removed.
…ition since hi32 remains 0xFFFFFFFF, making (hi32 & 0xFFFF) always 0xFFFF.
Check all that apply
Type of Change
Checklist
Description of Change
Summary of Completed Tests