Blueprint with !input condition does not evaluate

Running into an issue with a blueprint thats not evaluating the condition i’m setting, wondering if someone has an idea why not

blueprint:
  name: test with remote sensor
  description: test on
  domain: automation
  input:
    frequency:
      name: frequency to run
      description: how often to run the automation
      selector:
        select:
          options:
            - /1
            - /5
            - /10
    test_bool:
      name: test bool
      description: test bool
      selector:
        entity:
    sensor_1:
      name: first sensor
      description: first sensor to use for temperature
      selector:
        entity:
          domain: sensor
          device_class: temperature
    target_temp_1:
      name: first target temperature
      description: first target temperature
      selector:
        entity:
          
trigger:
  - platform: time_pattern
    minutes: !input frequency
 
condition: 
  - condition: template
    value_template: "{{ (states('sensor_1')) < (states('target_temp_1')) }}"

action:
  - service: input_boolean.turn_on
    target:
      entity_id: !input test_bool

The condition always evaluates to false.

> Executed: December 16, 2021, 1:54:00 PM
> Result:
> result: false
> entities:
>   - sensor_1
>   - target_temp_1

i’m sure there is something with the formatting of the value template but i just can’t figure it out.

States are strings. You need to convert them to numbers. Also don’t quote your variables or the template will use the literal variable name instead of the variable value.

value_template: "{{ states(sensor_1)|float(0) < states(target_temp_1)|float(0) }}"

e.g.

{% set a = 42 %}
{{ 'a' }} -> 'a'
{{ a }} -> 42

when I use that formatting I get the following error

Error: In ‘template’ condition: UndefinedError: ‘sensor_1’ is undefined

code in blueprint

condition: 
  - condition: template
    value_template: "{{ states(sensor_1)|float(0) < states(target_temp_1)|float(0) }}"