Danik
(Daniel)
July 6, 2019, 2:40pm
1
Hi to all,
i trying to use rest_command
i added the rest_command: !include config/rest.yaml in my configuration.yaml
create new file config/rest.yaml
the file include the following:
The issue:
when i trying to use service to call rest, i didnt find any …
my config is good?
123
(Taras)
July 6, 2019, 2:58pm
2
Change that to:
rest_command: !include rest.yaml
Danik
(Daniel)
July 6, 2019, 7:16pm
3
all my files are under config
123
(Taras)
July 6, 2019, 8:23pm
4
Hmm. For comparison, all my configuration files are in /home/ha/docker/homeassistant
so when I refer to them within the config file they look like this:
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
rest_command: !include rest.yaml
In order to assist you:
I created rest.yaml
, containing two rest commands, in the same directory as all other *.yaml
files.
#rest_command:
test_1:
url: 'http://192.168.1.100/whatever?cmd=something'
test_2:
url: 'http://192.168.1.100/whatever?cmd=something_else'
Added rest_command: !include rest.yaml
to the config file.
Restarted Home Assistant
The two rest commands appear in the Services list.
I’m not sure why this doesn’t work for you.
1 Like