Hi all,
I’m having some trouble getting the following automation to work. It results in an “automation error” when home assistant is restarted. Guessing I have something wrong with the rest syntax.
automation 8:
- alias: "Light test"
trigger:
platform: state
entity_id: input_select.light_show
to: "on"
action:
- platform: rest
name: 'Particle Devices'
resource: https://api.particle.io/v1/devices/1e0026001247343339383037/WARM_STRIP/
method: POST
payload: '{"args": "1,100,30"}'
headers:
Authorization: 'access_token SECRET'
I need to use an access token, passed like any other argument as well as the parameters args=“1,100,30”. Here is an example of a working cURL:
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d 'access_token=SECRET&args="1%2C0%2C10"' "https://api.particle.io/v1/devices/1e0026001247343339383037/WARM_STRIP/"
Any help would be greatly appreciated
Best,
Rob