I created a button Helper called ‘My Test Button’ and a schedule Helper called ‘My Test Schedule’. I created a time period in the schedule and within this an attribute called ‘temperature’ and gave it the value of 21.
I then made the following automation:
alias: My Test Automation
description: ""
triggers:
- trigger: state
entity_id:
- input_button.my_test_button
actions:
- action: climate.set_temperature
data_template:
temperature: "{{ state_attr('schedule.my_test_schedule','temperature') }}"
hvac_mode: heat
target:
entity_id: climate.thermostat
enabled: true