Can't use Response Variable as FLOAT

Hello. I am a n00b that is getting hung up on something that I didn’t think was very complicated.

What I am trying to do is relatively simple (I think). I am trying to call one script from another, and the inner script will return a value that will determine how long the outer script will WAIT after it is called.

I have tried MANY permutations of trying to send a Float, convert to Float, return a Float, etc. but I just can’t get the right combination. When I try to apply the returned variable to the WAIT I get:

expected float for dictionary value @ data['seconds'].

Any help sincerely appreciated.

Here’s the outer script that is receiving the return variable and trying to do the WAIT:

alias: "Test Return Float Initiate "
variables:
  Return:
    value: 0
sequence:
  - service: script.test_return_float
    data: {}
    response_variable: Return
  - delay:
      hours: 0
      minutes: 0
      seconds: "{{ Return.value }} | float"
      milliseconds: 0
mode: single
icon: mdi:script

Here is the inner script that is called by the one above:

alias: Test Return Float
variables:
  Return:
    value: 10
sequence:
  - stop: Normal Return Value
    response_variable: Return
mode: single
icon: mdi:test-tube-off

Your filter needs to be inside the curly braces.

"{{ Return.value | float }}"

The following works for me:

alias: Test Return Float
sequence:
  - variables:
      return: '{{ {"value": "10"} }}'
  - stop: Normal Return Value
    response_variable: return
mode: single
icon: mdi:test-tube-off
alias: "Test Return Float Initiate"
sequence:
  - service: script.test_return_float
    data: {}
    response_variable: Return
  - delay:
      seconds: "{{ Return.value | float(0) }}"
mode: single
icon: mdi:script

Huge thanks. You are indeed correct @Didgeridrew. It was the curly braces.

For me, I merely had to change the WAIT command to the following to get a successful execution:

delay:
  hours: 0
  minutes: 0
  seconds: "{{ Return.value | float }} "
  milliseconds: 0