Skip to content

Commit

Permalink
Add alt_mode to ProtocolRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
lanwin committed Feb 8, 2024
1 parent 0f50cf4 commit ecb108b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions components/samsung_ac/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ namespace esphome
optional<bool> power;
optional<Mode> mode;
optional<SwingMode> swing_mode;
optional<AltMode> alt_mode;
};

class Protocol
Expand Down
7 changes: 7 additions & 0 deletions components/samsung_ac/protocol_nasa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,13 @@ namespace esphome
packet.messages.push_back(power);
}

if (request.alt_mode)
{
MessageSet altmode(MessageNumber::ENUM_in_alt_mode);
altmode.value = altmode_to_nasa_altmode(request.alt_mode.value());
packet.messages.push_back(altmode);
}

if (request.swing_mode)
{
MessageSet hl_swing(MessageNumber::ENUM_in_louver_hl_swing);
Expand Down

0 comments on commit ecb108b

Please sign in to comment.