[fan] Add zero-copy support for API preset mode commands (#12404)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
J. Nick KostonandCopilot authored and GitHub committed 2025-12-19 22:05:52 +00:00
1 parent ada6c42f3f
commit c9fccdff25
8 files changed
+37 -14

No files matched your search

+1 -1
View File
@@ -447,7 +447,7 @@ void APIConnection::fan_command(const FanCommandRequest &msg) {
if (msg.has_direction)
call.set_direction(static_cast<fan::FanDirection>(msg.direction));
if (msg.has_preset_mode)
call.set_preset_mode(msg.preset_mode);
call.set_preset_mode(reinterpret_cast<const char *>(msg.preset_mode), msg.preset_mode_len);
call.perform();
}
#endif