How to modify device integration manually if its not has been recognized correctly

Hi,

I have problem with correct integration of Tuya/Smart Life Thermostat in Home Assistant. This is specific Thermostat which control the fan coil heating/cooling coil with 2 valves and 3 speed level fan (3 modes heating/cooling/fan). The device has integrated but not so good as I expected. It has been connected but I cant control it correctly. Problem is in temperature range (in Tuya app it is showing correct 5-35 degrees in tuya HA integration it is range from 1-7 degrees) In status yaml I could change it by max/min but the effect was temporal till it has been refreshed, modes switch has been integrated in very wird way (it should be heat/cool/fan), but it is (heating/cooling, heating/cooling, off). It is possible to modify this integration somehow and modify the used web api commands used by integration manually and add some other functionality not recognizet well? Can somebody guide me where I can find some explanation how to do it? I found on Tuya IoT Platform the code for function keys and values used for that device but I dont know how I can modify this on Home Assistant Tuya Integration.

This post shows how to customize the high and low limits for the climate entity

I have tried to change it by configuration.yaml and the effect I have got is not good. I have changed setting range from 1-7 to 5-35 by maxTemp and minTemp parameters and effect is: I see on the entity there is setting from 5-35 degree but when I set for example 25 degree my thermostat is not recognizing this value because its opperate on range 1-7 so by change this value entity is sending to device the parameter from out of his opperating range.

So, is there anyone who can help me and give some advise how to map the entity setting value to the value which my device is recognizing?

It is possible to do by configuration.yaml or please let me know if there is some ready universal integration for thermostat devices where I can set this remaping from real value to value which my device is opperating?

I think the easiest way could be if there is some fully customizable integration where I can personalize for example add buttons and knobs and hook to them the commands that device listens to

I found in documentation the “value_templating” feature. Which can help me to map the value, but there is explained how to do with sensors, triggers, actions, but how to use it for entities attributs here is my example:

homeassistant:
  customize:
    climate.thermostat:
      friendly_name: ThermostatName
      min_temp: 1
      max_temp: 7
      target_temp_step: 0.1
      current_temperature: 
        value_template: >
          {{ (states('climate.thermostat.current_temperature') | float) * 5 }}
      hvac_modes:
      - 'heat'
      - 'cool'
      - 'off'

How to modify value of “current_temperature” using value_template?

You can’t. Or if you can it’ll be overridden by the integration that provides the climate entity.

You should try a Generic Thermostat

Thank you PeteRage for advices, Its good someone interested to help.

Unfortunatelly I can’t set up generic thermostat I have problem with configuration of it.

Here is yaml:

climate:
  - platform: generic_thermostat
    name: TuyaThermostat
    heater: climate.thermostat
    target_sensor: climate.thermostat
    min_temp: 1
    max_temp: 7
    ac_mode: false
    target_temp: 17
    cold_tolerance: 0.3
    hot_tolerance: 0
    min_cycle_duration:
      seconds: 5
    keep_alive:
      minutes: 3
    initial_hvac_mode: "heat"
    away_temp: 16
    precision: 0.1

I am not sure how to connect to this generic thermostat my climate.termostat (it is entity_id). With this configuration it is not working