Hi,
I am trying to build an IR retransmitter to control my AV setup locked away in a cupboard.
I have managed to get the IR receiver to pick up the Sony codes from the remote and I can send commands from HA to the IR transmitter. Now to put them together.
I think I should use a remote_receiver automation on_sony. Something such as
remote_receiver:
pin:
number: GPIO18
inverted: true
dump: all
idle: 25ms
on_sony:
[xxx]
where the [xxx] should be a lambda function which calls remote_transmitter.transmit_sony
with the data passed from the receiver in the [remote_base::SonyData] (ESPHome: esphome::remote_base::SonyData Struct Reference) variable.
What’s the syntax to access to data
and nbits
data in the variable passed by the receiver? I presume it’s obvious if you know C++, but I alas do not.
Thanks!