Schedule data and use in scripts (solved)

Any single line template should always be surrounded by single or double quotes, but if you have quotes within the template make sure you use the opposite quotes.

some_key: "{{ states('sensor.sensor_name') }}"

If you’re using multi line templates then you don’t…

some_key: |
  {{ states('sensor.sensor_name') }}

It is all documented and explained in the Template Documentation under Templates in YAML, but there is a lot there to get through. Once you get it though you get it.

Also if you’re going to post YAML to the forum please make sure it’s properly formatted as per this guide, otherwise it’s impossible to tell where you might have gotten it wrong.

And finally, the recommended way to do what you’re doing to access the attributes would be

action: climate.set_temperature
target:
  area_id: garage
data:
  temperature: "{{ state_attr('schedule.garage_hvac', 'temperature')|float(0) }}"