The changes you made to the yaml I posted aren’t correct. If you read the comments I put within, it should provide some direction. For example you have:
# use a helper to store the target temperature
target_temperature_template: "{{ states('input_number.[climate.living_room_thermostat]target_temp') | float }}"
I am guessing you have not created a Input Number Helper with the name ‘[climate.living_room_thermostat]target_temp’. This most likely should be:
# use a helper to store the target temperature
target_temperature_template: "{{ states('input_number.living_room_thermostat_target_temp') | float }}"
You then need to add a Input Number Helper called ‘living_room_thermostat_target_temp’
You also added:
heater: input_boolean.living_room_call_for_heat
This shouldn’t be necessary as we are only using this ‘climate’ entity to fake the fan. If you have that input_boolean helper to automatically turn the fan on/off then you can use:
modes:
- "off"
- "fan_only"
# Use the 'call for heat' helper to set the hvac mode
hvac_mode_template: >
{% if is_state('input_boolean.living_room_call_for_heat', 'on') %}
fan_only
{% else %}
off
{% endif %}
For the fan you could use:
fan_modes:
- "off"
- "low"
- "medium"
- "high"
fan_mode_template: >
{% set p = state_attr('fan.living_room_fan', 'percentage') | int(0) %}
{% if p == 0 %}
off
{% elif p <= 33 %}
low
{% elif p <= 66 %}
medium
{% else %}
high
{% endif %}
set_fan_mode:
service: fan.set_percentage
target:
entity_id: fan.living_room_fan
data:
percentage: >
{% if fan_mode == 'off' %}
0
{% elif fan_mode == 'low' %}
33
{% elif fan_mode == 'medium' %}
66
{% else %}
100
{% endif %}
I did note that you were setting the current temperature by taking the value from the ‘sensor.kitchen_temperature’ entity. The yaml I have given above will allow a Generic Thermostat to manually control the climate entity created. Once that is working you can look to automate by creating an automation that set’s the fan mode according to the difference in setpoint and current temperature.
EDIT: For changing the fan speed based on the temperatures you could use the following:
fan_mode_template: >
{% set current = states('sensor.kitchen_temperature') | float(0) %}
{% set target = states('input_number.living_room_thermostat_target_temp') | float(0) %}
{% set diff = target - current %}
{# thresholds — adjust as needed #}
{% if diff <= 0 %}
off
{% elif diff < 2 %}
low
{% elif diff < 4 %}
medium
{% else %}
high
{% endif %}
Note: the code above takes the current temperature from the ‘sensor.kitchen_temperature’ as you were. It also relies on the ‘input_number.living_room_thermostat_target_temp’ helper which is used to store the setpoint