Hi all i’m trying to send my 433 codes with lambdas i have figured out how to send nexa but rc switch structure are different i have tried a few things but i’m not really sure where to go from here, this is where i’m at now:
any ideas?
switch:
- platform: template
name: "lambda_nexa"
optimistic: true
turn_on_action:
then:
- lambda: |-
auto call = id(my_tx).transmit();
esphome::remote_base::NexaData data = {15739910, 0,0,1,0 };
esphome::remote_base::NexaProtocol().encode(call.get_data(), data);
call.set_send_times(10);
call.set_send_wait(10000);
call.perform();
turn_off_action:
then:
- lambda: |-
auto call = id(my_tx).transmit();
esphome::remote_base::NexaData data = {15739910, 0,0,0,0 };
esphome::remote_base::NexaProtocol().encode(call.get_data(), data);
call.set_send_times(10);
call.set_send_wait(10000);
call.perform();
- platform: template
name: "lambda_rc"
optimistic: true
turn_on_action:
then:
- lambda: |-
auto call = id(my_tx).transmit();
esphome::remote_base::RCSwitchData data = {6173042};
esphome::remote_base::RCSwitchBase().transmit(call.get_data(), 6173043,4);
call.set_send_times(10);
call.perform();
turn_off_action:
then:
- lambda: |-
auto call = id(my_tx).transmit();
esphome::remote_base::RCSwitchData data = {6173043,4};
call.set_send_times(10);
call.perform();