First - maybe unrelated to your problem:
You should avoid declaring variables like that because if you add multiple instances of the block you would potentially redefine the variable - there is a special syntax {{temp_name:something}}
to ensure you’ll get an unique name for each block instance.
But in this case this code will not work anyways because getActions
is not defined on its own in JS scripts. Look at other examples for the proper way to call a thing action, for example MQTT Actions.
You have to call getActions from the “things” utility that you declared:
template: >
{{utility:things}}.getActions('hue', {{input:THING_ID}}).fadingLightCommand("color", new PercentType({{input:BRIGHTNESS}}), new DecimalType({{input:FADIING_TIME}}));
The next part I’m not sure, are you using this in a rule action (a “Then” script module)?
If so copy the whole contents of the Code tab in the rule page (YAML with triggers, conditions and actions) so we can try to reproduce it.