Allow haier remote protocol to use lambdas (#5898)

This commit is contained in:
Chris AtLee 2023-12-20 19:11:32 -05:00 committed by GitHub
parent b5932940ee
commit 937a9c96ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,12 +26,11 @@ DECLARE_REMOTE_PROTOCOL(Haier)
template<typename... Ts> class HaierAction : public RemoteTransmitterActionBase<Ts...> {
public:
TEMPLATABLE_VALUE(std::vector<uint8_t>, data)
TEMPLATABLE_VALUE(std::vector<uint8_t>, code)
void set_code(const std::vector<uint8_t> &code) { data_ = code; }
void encode(RemoteTransmitData *dst, Ts... x) override {
HaierData data{};
data.data = this->data_.value(x...);
data.data = this->code_.value(x...);
HaierProtocol().encode(dst, data);
}
};