I do want to split the configuration:
I read a lot of error-threads, but can not filter out, why mine is not working.
1st try:
homeassistant:
packages: !include_dir_merge_named packages
Error message for try one:
expected a dictionary for dictionary value @ data['packages']['shell_command']
2nd try:
homeassistant:
packages:
mailcowaliases: !include packages/packages_dir/package_file.yaml
3nd try: 8with and without trailing /)
homeassistant:
packages:
mailcowaliases: !include_dir_merge_list packages/
But none of them worked the way I expected.
At first, I have to full restart HA from developer tools to update changes.
The only version I got to work for the half was version two, but I do not want to give all the names of all yaml-files to the config.
here are three versions of the yaml, all have some other error messages as long as I change some of the above lines in configuration.yaml.
At the moment I got no message on restart, I got a message for the shell_command after pressing the button. But this is part of an other thread.
- input_text:
txt_1:
name: "txt_1"
initial: "1"
txt_2:
name: "txt_2"
initial: "2"
- input_button:
btn_1:
name: "btn_1"
btn_2:
name: "btn_2"
- shell_command:
shellcommand_add_la: >
curl "https://subd.dom.tld" \
-X POST \
--header "Content-Type: application/json" \
--header "X-K: xxx" \
--header "Authorization: Basic xxx" \
-d "{\"ad\" : \"{{ states('input_text.txt_la') }}\", \"active\": 1,\"comment\": \"\"}"
shellcommand_add_la: >
curl "https://subd.dom.tld" \
-X POST \
--header "Content-Type: application/json" \
--header "X-K: xxx" \
--header "Authorization: Basic xxx" \
-d "{\"ad\" : \"{{ states('input_text.txt_la') }}\", \"active\": 1,\"comment\": \"\"}"
an other version:
input_text:
txt_1:
name: "txt_1"
initial: "1"
txt_2:
name: "txt_2"
initial: "2"
input_button:
btn_1:
name: "btn_1"
btn_2:
name: "btn_2"
shell_command:
shellcommand_add_la: >
curl "https://subd.dom.tld" \
-X POST \
--header "Content-Type: application/json" \
--header "X-K: xxx" \
--header "Authorization: Basic xxx" \
-d "{\"ad\" : \"{{ states('input_text.txt_la') }}\", \"active\": 1,\"comment\": \"\"}"
shellcommand_add_la: >
curl "https://subd.dom.tld" \
-X POST \
--header "Content-Type: application/json" \
--header "X-K: xxx" \
--header "Authorization: Basic xxx" \
-d "{\"ad\" : \"{{ states('input_text.txt_la') }}\", \"active\": 1,\"comment\": \"\"}"
an other version
- input_text:
- txt_1:
name: "txt_1"
initial: "1"
- txt_2:
name: "txt_2"
initial: "2"
- input_button:
- btn_1:
name: "btn_1"
- btn_2:
name: "btn_2"
- shell_command:
- shellcommand_add_la: >
curl "https://subd.dom.tld" \
-X POST \
--header "Content-Type: application/json" \
--header "X-K: xxx" \
--header "Authorization: Basic xxx" \
-d "{\"ad\" : \"{{ states('input_text.txt_la') }}\", \"active\": 1,\"comment\": \"\"}"
- shellcommand_add_la: >
curl "https://subd.dom.tld" \
-X POST \
--header "Content-Type: application/json" \
--header "X-K: xxx" \
--header "Authorization: Basic xxx" \
-d "{\"ad\" : \"{{ states('input_text.txt_la') }}\", \"active\": 1,\"comment\": \"\"}"