Template problem with automation - Malformed message

I am trying to create some automations using my new HomeSeer WX300 Dimmers. I have successfully added them to my Z-Wave network, and Home Assistant sees them without issue.

I have created a few helpers in the HA UI to be able to adjust the behaviour of my night lighting.
I want to adjust the default dim level on the WX300 so when I get up in the middle of the night, it’s automatically at a preferred lighting level.

I have used the template page in Developer Tools, and it outputs the number correctly (as best I can tell) but when i use the same line of code in my automation, i get “Message malformed: not a valid value for dictionary value @ data[‘type’]” error. If I simply enter a number like “50” instead of the template, It works fine.

What am I missing with getting this going?

alias: Night Lights - Master Bedroom
description: Set the turn-on brightness of the dimmer for night time and daytime uses
trigger:
  - platform: time
    at: input_datetime.master_bedroom_night_lighting_time
    id: night
  - platform: time
    at: input_datetime.master_bedroom_day_lighting_time
    id: day
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: night
        sequence:
          - device_id: 84171cc322b0521e24aeadfce5639507
            domain: zwave_js
            type: set_config_parameter
            parameter: 36
            bitmask: null
            subtype: 36 (Default Brightness (Manual Control))
            value: {{ states('input_number.master_bedroom_day_lighting_brightness') |int }}
mode: single

the line below is the problematic entry.

value: {{ states('input_number.master_bedroom_day_lighting_brightness') |int }}

but this works no problem, so i know the rest of it is good

value: 50

single line templates should be enclosed by quotes.

value: "{{ states('input_number.master_bedroom_day_lighting_brightness') |int }}"

I had actually tried that as well, but since i believe it’s expecting an integer, I thought that was the wrong path to follow…
So that’s not my issue, although if that’s considered proper formatting/syntax I will definitely add the quotes