#Bug: REST command integration
1 messages · Page 1 of 1 (latest)
it's not clear what you did
the second picture (please use formatted text, not images of text) implies that you put the definitions in configuration.yaml), but it's not clear what you did to get the left image
agai
To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.
text
you're repeating what you posted above
did you choose the rest_command.xx actions?
rest_command:
example_request:
url: "http://example.com/"
ma_add_to_playlist:
url: https://l7t7582ssaiorltwaskuylypkcyjdibw.ui.nabu.casa/api
method: POST
headers:
accept: "application/json, text/html"
payload: >
{
"message_id": "1",
"command": "music/playlists/add_playlist_tracks",
"args": {
"db_playlist_id": {{playlist_id}},
"uris": [ {{track_url}} ]
}
}
content_type: 'application/json; charset=utf-8'
how did you define what went into the "Then do..." part?
alias: Add to song to playlist
description: ""
triggers:
- trigger: conversation
command:
- Add it to track {track_id}
conditions:
- condition: device
device_id: 382288c47f6746fe7e37ee3b6409f162
domain: media_player
entity_id: 404911e56fc7c1b74cd4c0ca1883a3b2
type: is_playing
actions:
- action: rest_command.example_request
response_variable: response
- action: rest_command.ma_add_to_playlist
response_variable: response
mode: single
👆
example_request is just a sanity test
did you restart HA after adding the commands to configuration.yaml?
you would need to restart HA, not just reload YAML
i did
test in
-> Actions