In my code now I’m using a list of numbers to select certain parts of a json-payload with 23 items:
id = [6,7,8,15,16,17,18,19,20,22]
x = 0
for data in list:
"some code"
if x in id:
print (payload)
x = x+1
I only want to use the json-items 6, 7, 8, 15, 16, etc.
This works very nicely.
Now I want to import this list from configuration.yaml.
What should I write under:
CONFIG_SCHEMA = vol.Schema({
DOMAIN: vol.Schema({
....
vol.Optional(CONF_XYZ):cv.xyz
....
in my code to import this list? And what should I write in configuration.yaml to make this work?