Climate Template (set_temperature)Help Required

Hi there. I’ve wanted to try and get my dumb AC units to be recognise as a cliamtedevice by google home.

I found this ( GitHub - jcwillox/hass-template-climate: :snowflake:Templatable Climate Device for Home Assistant, Supports Running Actions On Service Calls.) and while old, i managed to work out how to get it working for the most part. I am howveer having difficulties with getting the set_temperature command to work.

climate:
  - platform: climate_template
    name: HVAC
    unique_id: climate.HVAC
    modes:
      - "cool"
      - "off"
    min_temp: 23
    max_temp: 25

    target_temperature_template: "{{states ('input_number.hvac_target_temp') }}"

    set_temperature:
      - service: input_number.set_value
        target: entity_id: input_number.hvac_target_temp
        data:

    # get current temp.
    current_temperature_template: "{{ states('sensor.temperature') }}"

    # get current humidity.
    current_humidity_template: "{{ states('sensor.humidity') }}"

The difficulty i have is getting set_temperature working (i.e. changing the value via the climate card will send the command to the inputnumber i set up.

I’m at a total loss as to what should be in the missing "data: " field such that it grabs the value off the temperature slider on the dashboard climate card.
Screenshot 2023-10-04 042042

Any assistance will be very much appreciated!

3 Likes

I managed to get it working! just leaving it here incase anyone had similar questions

climate:
  - platform: climate_template
    name: HVAC
    unique_id: climate.HVAC
    modes:
      - "cool"
      - "off"
    min_temp: 23
    max_temp: 25

    target_temperature_template: "{{states ('input_number.hvac_target_temp') }}"

    set_temperature:
      - service: input_number.set_value
        target: entity_id: input_number.hvac_target_temp
        data:
          value: "{{ temperature }}"

    # get current temp.
    current_temperature_template: "{{ states('sensor.temperature') }}"

    # get current humidity.
    current_humidity_template: "{{ states('sensor.humidity') }}"
3 Likes

Were you able to add the state to the climate entity? So while it is set to Heat, it can display idle, heating?

Hey there @Ex14 , I do also believe that the climate template can provide me a solution for my problem. HOW did you get this up an running in HASS, as I do not see in HACS nor is there an instruction?

Thanks a lot
Christian

1 Like

Same issue for me about the installation process
After some research on how to install custom hacs repo I found this page that help me

To install it I’ve done those step :

  1. Download the github repo from the github main page GitHub - jcwillox/hass-template-climate: ❄️Templatable Climate Device for Home Assistant, Supports Running Actions On Service Calls. (click on code)
  2. Copy paste the folder climate_template into the folder custom_component on my home assistant (with a file editor)
  3. Restart HA
  4. Add a simple climate template into the file configuration
  5. Restart HA
  6. Check that the climate template is available as an entity

I don’t know if you can do the step 2 and 4 and restart at once. I had an alert that climate template is unknow from home assistant when I try it so I didn’t take the risk.

I have another problem.
I need to use the state of some temperature sensor as the target temperature.
And I use the state of another sensor as the current temperature.
The current configuration is as follows:

climate:
  - platform: climate_template
    name: otgw_heater
    unique_id: otgw_heater
    modes:
      - "heat"
      - "off"
    target_temperature_template: "{{states('sensor.target_temperature')}}"
    current_temperature_template: "{{states('sensor.current_temperature')}}"

image
As we can see the target temperature is not displayed and cannot be adjusted