Generic thermostat using multiple heat source

Hi,

I have 3 rooms that I want to control heating (livingroom / bedroom / office). The Livingroom has a Tado thermostat. Both the bedroom and the office are controlled by a generic thermostat with a Xiaomi temperature sensor as input and a input_boolean as switch. That switch is than used in an automation to set the temperature on the Tado.

Now I bought an electric heater for the office room and would like to choose between Central Heating (using the Tado) or Electric Heating.

I have created a input_select where I can choose what heat source I want to use and thought to use a template in the heater part of the generic thermostat, but when I check the configuration with this config I get the following error:

Invalid config for [climate.generic_thermostat]: Entity ID {% if is_state('input_select.office_heat_source', 'Electric Heating') %}
input_boolean.electric_heat_trigger
{% elif is_state('input_select.office_heat_source', 'Central Heating') %}
input_boolean.cv_heat_trigger
{% endif %}
is an invalid entity ID for dictionary value @ data['heater']. Got "{% if is_state('input_select.office_heat_source', 'Electric Heating') %}\n input_boolean.electric_heat_trigger\n{% elif is_state('input_select.office_heat_source', 'Central Heating') %}\n input_boolean.cv_heat_trigger\n{% endif %}\n". (See ?, line ?).

I used the following yaml:

climate:
  - platform: generic_thermostat
    name: Office Test
    heater: >
      {% if is_state('input_select.office_heat_source', 'Electric Heating') %}
        input_boolean.electric_heat_trigger
      {% elif is_state('input_select.office_heat_source', 'Central Heating') %}
        input_boolean.cv_heat_trigger
      {% endif %}
    target_sensor: sensor.ble_temperature_office
    min_temp: 15
    max_temp: 32
    ac_mode: false
    cold_tolerance: 0.1
    hot_tolerance: 0.0
    min_cycle_duration:
      seconds: 5
    precision: 0.1
    target_temp_step: 1
  - platform: generic_thermostat
    name: Bedroom Test
    heater: input_boolean.cv_heat_trigger
    target_sensor: sensor.ble_temperature_office
    min_temp: 15
    max_temp: 32
    ac_mode: false
    cold_tolerance: 0.1
    hot_tolerance: 0.0
    min_cycle_duration:
      seconds: 5
    precision: 0.1
    target_temp_step: 1

input_boolean:
  cv_heat_trigger:
    name: CV Heat Trigger
    icon: mdi:heat-wave
  electric_heat_trigger:
    name: Electric Heat Trigger
    icon: mdi:heat-wave

input_select:
  office_heat_source:
    name: Office Heat Source
    options:
      - Electric Heating
      - Central Heating
    icon: mdi:heat-wave

Does anyone know how to switch the heater based on the input select?

Ever figure this out? I have the same problem.

Don’t know anymore. In the meantime I have moved to a different house where there is a tado smart radiator valve in each room and I don’t use the electric heater anymore.

does not state that ‘heater’ is possible to template