Hi there,
I created a package to address all binary sensors and switches for my unipi neuron device (one package for controller, one package for an extension module).
Since this is a long and repeating list (e.g. 16 digital inputs where only coil number and name are different), and I use these names again in a group, I was wondering if it is possible to do some kind of for-loop in a yaml config file. Maybe looping through a parameter ?
Like this:
define "inputs":{"0":"DigitalInput_1_1","1":"DigitalInput_1_2","2":"DigitalInput_1_3",.....}
switch:
foreach inputs as key=>val
- coil: key
name: val
next
group:
- entities:
foreach inputs as key=>val
- val
next
Thanks for your insights
Steven