Automation Trigger Help - Comparing Sensor Value to Input_Number

I’m trying to create an automation to turn on my furnace by sending an MQTT command to an ESP8266 which is connected to my furnace. I’m currently having an issue getting the trigger to function. I’m attempting to trigger the automation when a temperature sensor value falls below an input_number.

  - alias: HVAC Call for Heat         
    trigger:     
      - platform: numeric_state
        entity_id: sensor.kids_room_temperature
        below: {{ states.input_number.temp_setpoint.state }}
    action: 
      - service: mqtt.publish
        data_template:
          topic: "hvac/command"
          payload: "heat"
          retain: true

I’m getting the error:

2018-01-18 12:33:09 ERROR (SyncWorker_0) [homeassistant.util.yaml] invalid key: “OrderedDict([(‘states.input_number.temp_setpoint.state’, None)])”
in “/config/automations.yaml”, line 50, column 0
2018-01-18 12:33:09 ERROR (MainThread) [homeassistant.bootstrap] Error loading /config/configuration.yaml: invalid key: “OrderedDict([(‘states.input_number.temp_setpoint.state’, None)])”
in “/config/automations.yaml”, line 50, column 0

I’m new to using Home Assistant (1 month) and have been unable to find the source of the issue. Is there anyone who could offer some help in troubleshooting this issue?

Off the top of my head, I’d try quotes and/or single-quotes:

 below: "{{ states.input_number.temp_setpoint.state }}"

Hopefully the above will work, but it may not accept templates there.

If not you’ll need to use a template trigger instead, where the template does the maths.

I tried using both single and double quotes and still ended up with errrors. Thanks for the recommendation.

So I found a solution but went an entirely different route. I set up a sensor with an if statement, instead of attempting to create a boolean sensor. The if statement still outputs a custom “yes” or “no” simulating a boolean.

sensor:
  - platform: template
    sensors:
      setpoint_status:
        friendly_name: "Setpoint Reached"
        value_template: >-
          {% if states('sensor.kids_room_temperature')|float > states('input_number.temp_setpoint')|float %}
            yes
          {% else %}
            no
          {% endif %}

the automation now looks like this

automation:
  - alias: HVAC Call for Heat TEST 
    trigger:
      - platform: state
        entity_id: sensor.setpoint_status
    condition: 
      - condition: state
        entity_id: sensor.setpoint_status
        state: 'no'
    action: 
      - service: mqtt.publish
        data_template:
          topic: "hvac/command"
          payload: "heat"

You could save yourself the code of the sensor and use that template as a template trigger if you’re not using the sensor for anything else.