Requesting help with heater/thermostat automation to equalize temp to another sensor

Hello everyone. I’m a home assistant newby, so please forgive me ;-). I would like to create an automation to do the following (and I’m trying to do it directly in HA, although Node-Red might be easier).

My wife’s bedroom is colder than the rest of the house, so I’ve put in a space heater, and I would like it to turn on if her temp < house.temp - .5, and turn off when her temp > house temp + .5. Additionally, I’d like it to stay on for an hour if she manually turns it on, and stay off for an hour if she manually turns it off. Well… I got stuck immediately just trying to implement the turn-on, here’s what I have:

- id: '1640901247332'
  alias: Nancy's Heater
  description: Equalize Nancy's Bedroom to Main Thermostat
  trigger:
  - platform: numeric_state
    entity_id: sensor.nancys_bedroom_temperature
    below: '{{(state_attr(''climate.home'',''current_temperature'')|float)-0.5}}'
  condition: []
  action:
  - type: turn_on
    device_id: e107e638e6acd4caaa1a9987efa9cfe1
    entity_id: switch.heater
    domain: switch
  mode: single

The above results in this error:
Invalid config for [automation]: expected float for dictionary value @ data[‘below’]. Got None.

I would appreciate help getting past this point, as well as tips on implementing the entire project.
Thank you.

I’m not sure you can use templates in a numeric state trigger - at least not in the “below” section. Try this instead:

  trigger:
  - platform: template
    value_template: '{{ (states.sensor.nancys_bedroom_temperature.state|float) <= ((state_attr("climate.home","current_temperature")|float)-5) }}'

Check your quotes, too - you can use " or ’ depending on context, but ‘’ (which you had in your below section) will not work

Thank you ‘EKC’. I ended up going down a slightly different path, it works great for my needs:
Thermostat for using space heater to keep an otherwise cold room in sync with the rest of the house - Share your Projects! - Home Assistant Community (home-assistant.io)