Home Assistant Create button that truns on heating at set time and set temp

Use the flowing code:

alias: Verwarming aan op gegeven tijd
description: ""
trigger:
  - platform: time
    at: input_datetime.set_time
condition:
  - condition: state
    entity_id: input_datetime.set_time
    state: input_datetime.set_time
action:
  - service: climate.set_temperature
    data:
      entity_id: climate.lyric_e38403_lyric_t6_thermostat
      temperature: "{{ states(\"input_number.set_temperature\") }}"
mode: single

To add an option to set the temperature when starting the heating, you can do the following:

  1. Set up an input_number entity in Home Assistant to allow you to input a temperature. You can do this by adding an input_number platform to your configuration.yaml file and giving it a unique identifier.
  2. Add a form input field to your Home Assistant dashboard to allow you to set the temperature. You can do this by adding a “Form” card to your dashboard and adding an input field for the input_number entity.
  3. In the automation configuration, use the value of the input_number entity as the temperature when setting the thermostat entity.

Here is an example of what the automation configuration might look like:

Copy codeautomation:
  - alias: "Start heating at set time"
    trigger:
      platform: time
      at: '{{ now().strftime("%H:%M") }}'
    condition:
      - condition: template
        value_template: '{{ is_state("input_datetime.set_time", now().strftime("%H:%M")) }}'
    action:
      - service: thermostat.set_temperature
        data:
          entity_id: thermostat.living_room
          temperature: '{{ states("input_number.set_temperature") }}'

This automation will check the input_datetime entity every minute to see if the current time matches the time set in the input_datetime entity. If it does, the automation will start heating by setting the thermostat entity to the temperature specified in the input_number entity.