KartoffelToby / better_thermostat

This custom component for Home Assistant will add crucial features to your climate-controlling TRV (Thermostatic Radiator Valves) to save you the work of creating automations to make it smart. It combines a room-temperature sensor, window/door sensors, weather forecasts, or an ambient temperature probe to decide when it should call for heat and automatically calibrate your TRVs to fix the imprecise measurements taken in the radiator's vicinity.
https://better-thermostat.org
GNU Affero General Public License v3.0
713 stars 124 forks source link

Tuya TV02-Zigbee Current temp wrongly related to number.*_local_temperature_calibration #1345

Closed mistraloz closed 2 months ago

mistraloz commented 2 months ago

Prerequisites

    zigbeeModel: ['TS0601'],
    model: 'TS0601',
    vendor: '_TZE200_hue3yfsn',
    description: 'Automatically generated definition',
    extend: [],
    meta: {},

Description

During the configuration step, i cannot choose the right sensor for the current temperature of my TVR. The suggested option is related to the temperature calibration (difference between measured temp and the real one)

Steps to Reproduce

  1. At configuration step
  2. Add the TV02 from Tuya (i use Zigbee2mqtt implementation)
  3. Choose the temperature sensor

Expected behavior:

I would like choose climate.chauffage_chambre.current_temperature that i can see here :

hvac_modes:
  - "off"
  - heat
min_temp: 5
max_temp: 30
target_temp_step: 0.5
preset_modes:
  - none
  - auto
  - manual
  - holiday
current_temperature: 19.2
temperature: 19
preset_mode: manual
friendly_name: Chauffage chambre
supported_features: 401

Actual behavior:

I can only choose number.chauffage_chambre_local_temperature_calibration

min: -5
max: 5
step: 0.1
mode: auto
unit_of_measurement: °C
device_class: temperature
icon: mdi:math-compass
friendly_name: Chauffage chambre Température

Versions

HA: 2024.4.4 BT: 1.5.1

Additional Information

I am new in Home Assistant but i saw this configuration in zigbee2mqtt file (that is my own) :

advanced: 
  homeassistant_legacy_entity_attributes: false
  legacy_api: false
  legacy_availability_payload: false

I did not try to switch them (and i am not sure if its can be related but the device_class reported is probably wrong for the calibration one).

KartoffelToby commented 2 months ago

@mistraloz you dont need to select the trv temp sensor, you should select a external Sensor in the room

mistraloz commented 2 months ago

Thx for the answer but I would like use the internal sensor of the TVR (i know, its not perfect but that worked well like that until now with jeedom). I will see if i can do something with Zigbee2mqtt

mistraloz commented 2 months ago

Hum... at the end, i am sure there is a possibility to doing that... but i didn't find how to change mqtt translate (from z2m attributes to home assistant entities). In my opinion (humble one), https://github.com/KartoffelToby/better_thermostat/blob/2d6f1fb0de5f2e582fdea2259c1dd622cac6d044/custom_components/better_thermostat/config_flow.py#L332 the climate entities should be allowed... but i do not know the impact for others configurations (and others devices). So nevermind, i will do what you said and add some now sensor (the integrated one in my heaters are know as bad one).

Thx for the support, i close the issue.