Is there a way we could specify the Data_template for the Remote Transmitter component?
What I want to achieve is a dynamic input of the raw codes to be passed through the remote transmitter. Currently I see that the “code” is hard-coded. I was trying to check if there is data_template option to pass “code” dynamically
Working Version
- platform: template
name: daikinpoweron
turn_on_action:
- remote_transmitter.transmit_raw:
code: [414,-494,368,-496,368,-496,370,-494,368,-498,368,-25192,3540,-1678,450,-1282,424,-442,396,-468,424,-440,420,-1284,398,-466,424,-442,422,-442,422,-442,422,-1284,422,-442,424,-1282,424,-1282,422,-444,398,-1308,424,-1282,422,-1284,398,-1308,420,-1284,424,-442,422,-442,422,-1284,424,-440,424,-440,398,-466,424,-442,422,-442,424,-440,400,-464,424,-442,422,-442,424,-442,424,-1282,422,-446,420,-1284,424,-440,424,-442,422,-442,422,-1282,398,-1308,424,-442,424,-440,422,-444,424,-442,422,-442,422,-444,422,-440,400,-464,424,-442,398,-466,424,-442,422,-442,424,-442,420,-444,424,-442,422,-440,424,-1284,424,-1280,424,-1284,424,-440,422,-1284,424,-442,422,-1282,422,-1282,422,-34626,3486,-1758,368,-1340,366,-496,370,-496,368,-496,370,-1336,368,-496,368,-496,370,-496,366,-496,368,-1338,370,-496,366,-1338,366,-1340,368,-496,368,-1338,366,-1338,368,-1336,370,-1338,370,-1336,368,-496,368,-496,370,-1338,368,-496,366,-498,370,-496,368,-496,370,-496,366,-498,368,-496,368,-496,370,-496,368,-496,368,-498,368,-1338,368,-496,368,-498,368,-496,366,-496,370,-1336,368,-496,368,-496,370,-494,368,-496,370,-496,368,-496,368,-496,368,-496,366,-498,370,-496,368,-496,370,-496,366,-496,368,-496,368,-496,370,-496,368,-496,366,-496,370,-496,366,-1338,366,-498,368,-1336,368,-496,368,-1336,370,-496,368,-34680,3534,-1708,370,-1338,416,-448,416,-448,418,-448,366,-1338,418,-446,368,-496,368,-496,368,-496,366,-1340,366,-498,368,-1336,418,-1288,366,-496,418,-1290,416,-1288,416,-1290,368,-1338,418,-1288,418,-448,368,-496,418,-1288,368,-498,416,-452,364,-496,418,-446,366,-498,368,-498,366,-496,370,-496,414,-448,370,-494,368,-496,418,-448,418,-446,368,-496,418,-448,368,-496,368,-496,366,-498,420,-1286,370,-496,366,-498,418,-1286,418,-448,368,-1338,416,-1288,420,-446,416,-450,416,-1246,458,-448,366,-496,418,-1286,370,-1338,418,-446,368,-496,422,-446,366,-496,418,-448,416,-448,370,-496,368,-496,366,-498,418,-446,412,-452,418,-448,366,-498,418,-448,368,-1338,368,-1338,366,-1338,370,-496,416,-448,418,-446,368,-496,416,-448,418,-450,366,-496,420,-448,414,-448,420,-446,418,-446,368,-498,368,-498,366,-496,370,-496,368,-496,370,-496,418,-448,420,-1286,418,-1288,370,-496,366,-498,370,-496,414,-448,418,-448,368,-496,370,-496,368,-496,366,-496,370,-496,366,-1340,414,-1290,370,-496,416,-448,418,-446,368,-496,368,-496,368,-496,368,-496,368,-498,416,-446,418,-448,368,-496,366,-498,416,-448,416,-446,370,-498,366,-502,414,-446,368,-1338,368,-496,368,-498,366,-498,416,-448,416,-448,366,-1340,368,-1336,370,-496,366,-498,418,-448,366,-498,418,-446,418,-446,368,-496,370,-1336,368,-496,418,-446,368,-496,366,-498,368,-498,414,-448,418,-448,366,-500,366,-496,368,-498,366,-1338,368,-498,368,-496,418,-448,368,-1338,366,-1338,366]
carrier_frequency: 38kHz
Desired option
- platform: template
name: daikinpoweron
turn_on_action:
data_template:
- remote_transmitter.transmit_raw:
code: {{ variable }}
carrier_frequency: 38kHz
The variable option could be fed from anywhere, either through the Remote receiving component or through a MQTT from other sources