[solved] Generic thermostat with inverted logic

I would like to set a generic thermostat to drive an heater.
I have a temperature sensor and a switch (a shelly 1).
But I am living in France and here many electric heaters are drived by a called “fil pilote”. This way, when the switch is ON, the heater stops ; when the switch is OFF the heater warms.
Of course, I can use “ac_mode: true” to invert the logic but it is not very sexy on the interface. How I could do that (keeping “ac_mode: false”) ? With a kind of virtual/dummy switch ?

Yes, use the template switch.
There’s an example where you can play with.

1 Like

Thank you for the help.

But I am still lost. I need to provide a switch to the generic thermostat. That need to be a virtual/dummy switch in order I could copy it to the real switch (inverting the value). But the copy switch template seems to do the opposite of my need : it copies a dummy switch from a real switch.

Sorry, it is probably a very noob question…

Well, you need to revert the logic.

  - platform: template
        value_template: "{{ is_state('switch.your_switch', 'off') }}"
          service: switch.turn_off
            entity_id: switch.your_switch
          service: switch.turn_on
            entity_id: switch.your_switch

Thank you !

Hello, i’m new to HASS and i’m in the the situation :
Sheely 1 to drive electric radiator and trying to setup a thermostat.
Can you explain where you put the code provided by VDRainer ?