Shell_commands, can't get them to work

I have several devices I would like to call by shell script, for example some Nanoleaf scenes and brightness, Philips Hue scenes etc.

To get this to work I uploaded a bash script to /homeautomation/bash/huescene_livingroom.sh with this script:

#!/bin/bash
curl -v -X PUT \
    --url  http://192.168.1.21/api/zNEq4-oSZD6jCQN9lMniDtBXx6lwUDrPDC5Kdjso/groups/2/action\
    --header 'content-type: application/json' \
    --data '{"scene":"'"$1"'"}';

Then in configuration.yaml I added:

shell_command:
  hue_scene_livingroom: "/config/scripts/huescene_livingroom.sh {{ scene_name }}"

and to test it all I have an automation with the action: shell_command_hue_scene_livingroom. There are no options there, so I open this action in yaml which shows me:

action: shell_command.hue_scene_livingroom
metadata: {}
data: {}

to that I have to add the scene I want to call. when I add:

scene_name: WOtjkt7xREbCkKP

I get the error ‘Message malformed: extra keys not allowed @ data[‘actions’][0][‘scene_name’]’

when u add the line within the data brackets, I don’t get the error, but nothing happens when I run the automation. What am I doing wrong?

Hi Utrecht,

Scene names are lower_case_chase format. I see capitols there…

the problem i, is that i am not using HA scenes here, but calling a scene from Philips Hue, which uses both capitals and lower case for naming them.