Help with data templates (expected float for dictionary value @ data['below'])

Hi,
I’m running into trouble with using variables in automations. I’m attempting to use an input_number as a threshold for the below parameter in a condition. This occasionally runs into errors, reporting that the automation “expected float for dictionary value @ data[‘below’]”. The automation as written below is ‘saved’ and usually works. I’ve tried doing all of these:
below: {{ states.input_number.temp_min.state | float }}
below: "{{ states.input_number.temp_min.state | float }}"

The editor won’t let me save those, I get an error:
Message malformed: expected float for dictionary value @ data['action'][0]['choose'][0]['conditions'][0]['conditions'][2]['below']

I feel like I’m missing something obvious. Any pointers? Thanks!

This is (a part of) the automation as it is now, and seems to work most of the time.

condition: []
action:
  - choose:
      - conditions:
          - condition: or
            conditions:
              - condition: and
                conditions:
                  - type: is_no_motion
                    condition: device
                    device_id: fe3c2ae017d311eb95fe9d88dd942fab
                    entity_id: binary_sensor.living_motion_motion
                    domain: binary_sensor
                    for:
                      hours: 0
                      minutes: 15
                      seconds: 0
                      milliseconds: 0
                  - condition: time
                    after: '08:00:00'
                    before: '22:30:00'
              - condition: and
                conditions:
                  - type: is_no_motion
                    condition: device
                    device_id: fe3c2ae017d311eb95fe9d88dd942fab
                    entity_id: binary_sensor.living_motion_motion
                    domain: binary_sensor
                    for:
                      hours: 0
                      minutes: 1
                      seconds: 0
                      milliseconds: 0
                  - condition: time
                    after: '22:30:00'
                    before: '08:00:00'
              - condition: numeric_state
                entity_id: sensor.living_motion_temperature
                below: input_number.temp_min
          - condition: state
            entity_id: fan.living_room_fan
            state: 'on'
        sequence:
          - service: fan.turn_off
            target:
              device_id: 66c1f9b30121f607e0e0f0e2ac1167dd

I see no evidence in the docs that you can use a template in the above: or below: parts of a numeric_state condition. You could, however, replicate that with a template condition. You should be able to use an input_number, but if that isn’t working, the answer isn’t to try to use a template. I like to use a persistent_notification to display a value before I use it to make sure it’s what I think it should be. You may also find more information about the issue from the automation trace.

Thanks! I had not noticed that about the above/below conditions. I’ll look into the logs some more to see why my input_numbers are not returning numbers sometimes.