Help using input variables in script

Hi all

A little new to the language, so I am probably making some rookie mistakes here, but I have a script that I am trying to trigger from scheduler card, with 2 input variables: “room” and “heat_mode”. The idea is I want one script to control all of my climate entities, which have input numbers to control temperature, based on whether they are moving to heat or idle. The entity names are formatted with the room name and mode, so I am trying to pass these in the script, but as they need to be used in the template that pulls in the temperature, its not working and I have tried a few ways based on what I have found here already, including passing them directly into the template and this version with the variable set separately. Any help would be appreciated


alias: Climate Schedule Set Target
description: Sets climate parameters for scheduler-card
variables:
  target_entity: 'climate.{{ room }}'
  helper: 'input_number.{{ room }}_{{ heat_mode }}_target_helper'
sequence:
  - target:
      entity_id: "{{ target_entity }}"
    data:
      hvac_mode: heat
    action: climate.set_hvac_mode
  - data:
      temperature: "{{ states('[helper]') }}"
    target:
      entity_id: "{{ target_entity }}"
    action: climate.set_temperature
mode: single
icon: mdi:radiator

I’m not super familiar with Scheduler card and you haven’t shared your card config, so wehave no way to check if you have set up the card actions correctly… but, assuming that side of things is correct, the following is incorrect:

It should be:

 temperature: "{{ states(helper) }}"

Thanks. At the moment I’m just testing with a service call from dev tools, so the scheduler card is out of the picture, but that worked