Generic thermostat - Switch between heating and cooling

Generic thermostat now supports both heating and cooling. I can set the HVAC mode by calling a service, but then the operation of the “heating” switch does not invert. This can be achieved by setting the “ac_mode” configuration variable, but then the configuration has to be changed.

How can I switch between heating and cooling (including the inverted “heating” switch operation) without changing the configuration?

Context: I have a heat pump with floor heating. I control the heat pump mode manually through HA, but then the operation of the floor heating valves (which are controlled with generic thermostats) also has to change.

It can be a heater or cooler. It’s one or the other. Not both.

https://www.home-assistant.io/integrations/generic_thermostat/

There’s a third party thermostat that does both.

4 Likes

I don’t need two switches. The “ac_mode” parameter supports my needs but I “just” need a service which can change the parameter without changing the configuration.

But I will give the third party thermostat a try. Thanks!

I have evaluated the dual_smart_thermostat, but unfortunately that does not fulfill my needs. The heat pump and all individual room thermostats have to be switched at the same time between heating/cooling mode. I would like to do that using an automation, but now the only way is to change the “ac_mode” paramater for allt thermostats in the configuration YAML.

As I said before. You can’t. You set ac_mode to true or false when you configure the generic thermostat and it stays that way. There is no service to change it.

If you want heating and cooling in the one thermostat you have to use the third party one I linked to above.

Create a template switch that does that.

Use it in the dual thermostat.

1 Like

Hi, i have the same problem. Can yuo pls explain how to use the switch template with dual smart thermostat integration? I used this code but

switch:
  - platform: template
    switches:
      modalita_riscaldamento:
        friendly_name: "Modalità Riscaldamento"
        value_template: "{{ is_state('climate.Termostato_Casa', 'heat_cool') and is_state_attr('climate.Termostato_Casa', 'hvac_action', 'heating') }}"
        turn_on:
          service: climate.set_preset_mode
          data:
            entity_id: climate.Termostato_Casa
            preset_mode: "home"
        turn_off: 
      modalita_raffreddamento:
        friendly_name: "Modalità Raffreddamento"
        value_template: "{{ is_state('climate.Termostato_Casa', 'heat_cool') and is_state_attr('climate.Termostato_Casa', 'hvac_action', 'cooling') }}"
        turn_on:
          service: climate.set_preset_mode
          data:
            entity_id: climate.Termostato_Casa
            preset_mode: "away"
        turn_off: 


But it’s doesnt works.