Skip to content

Commit

Permalink
Fix fan mode for nasa
Browse files Browse the repository at this point in the history
  • Loading branch information
lanwin committed Feb 6, 2024
1 parent b1b8af3 commit 7250e70
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion components/samsung_ac/protocol_nasa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,10 +500,24 @@ namespace esphome
target->set_mode(source, operation_mode_to_mode(message.value));
return;
}
case MessageNumber::ENUM_in_fan_mode:
{
ESP_LOGW(TAG, "s:%s d:%s ENUM_in_fan_mode %li", source.c_str(), dest.c_str(), message.value);
FanMode mode = FanMode::Unknown;
if (message.value == 0)
mode = FanMode::Auto;
else if (message.value == 1)
mode = FanMode::Low;
else if (message.value == 2)
mode = FanMode::Mid;
else if (message.value == 3)
mode = FanMode::Hight;
target->set_fanmode(source, mode);
return;
}
case MessageNumber::ENUM_in_fan_mode_real:
{
ESP_LOGW(TAG, "s:%s d:%s ENUM_in_fan_mode_real %li", source.c_str(), dest.c_str(), message.value);
target->set_fanmode(source, fan_mode_real_to_fanmode(message.value));
return;
}
default:
Expand Down

0 comments on commit 7250e70

Please sign in to comment.