Open hippich opened 1 year ago
Dito,
substitutions not working in
` - platform: template
name: AC301 Button
id: ir_sw3
turn_on_action:
- remote_transmitter.transmit_raw:
carrier_frequency: 38kHz
# 29deg Heat
code: ${set30}
`
where set30 is a list
Describe the problem you have/What new integration you would like
I am trying to create ESPHome controller for ceiiling fans around my house using CC1101 board and https://github.com/dbuezas/esphome-cc1101 code. So far it works pretty well, but I need to configure ~10 remote's buttons multiplied by several fans. I want to avoid repeating raw code and provide some structure. ESPHome's
substitutions
feature seems like a perfect candidate, but I can't figure out how to apply it to arrays/lists.Please describe your use case for this integration and alternatives you've tried:
I have something like that at the very top of my .yaml file:
And I want to define binary_sensor like this:
It fails to compile at
code:
line, expecting a plain yaml list instead of what I've put into it. I think substitutions simply not applied here, since it is list/array.Any ideas of alternative that would allow me to modularize configuration?
Additional context
I run ESPHome together with Home Assistant if that makes any difference.