Smart Life (tuya) show wrong temperature

I’ve seen two mentions of the underfloor temperature sensor not being available in HA but visible in smart_life and my smart thermostat apps.

Has anyone worked out how we might retrieve this ?

Also, the HVAC_MODE seems to only show ‘Off’ or nothing. Anyone know how it can be persuaded to show ‘Heat’ when it is heating and maybe even ‘Idle’ when it is switched on but at target temp and hence not using power.

Is there any way to intercept and see the dialog between the phone app and the cloud ?

Incidently, in my android apps, the underfloor temp it shows appears to be half the value it should be !!

1 Like

Here is mention of the localtuya custom component:

I have problems getting the id and key values from my MoesHouse BHT-002-GCLW (Wifi) but I hear that it’s working great.

Very well summarized. Just one addition. When I set the temperature from the thermostat Lovelace card, I can only choose whole degrees. Putting this in the customize.yaml solves that problem.

climate.thermostaat:
  target_temp_step: '0.5'

Just Reload Location & Customizations.

It’s not true , doesn’t solves problem. If you set 16.5 °C on Home Assistant , Climate on Tuya is setted as 16°C so you have a fake setting showing wrong temperature 16.5, since few minutes later on HA read the same Temperature on Tuya App and show 16C. Need more code to give a coma number during setting and not a N number.

Ah, you’re right, I did not see that. But all will be fixed in the next version of tuyaha, as per this pull request by @rogermiret:


I’m not in a hurry, or else I could apply this fix in my system.

Roger, is it possible to add an extra property to the climate component to allow for different dividers? Not everyone uses division by 2, some use by 10. Also, when things get ‘fixed’ on the side of the thermostat, it’s easy to remove the parameter.
Something like:

customize:
  climate.thermostaat:
    climate_divider: 2

Hi guys,
I find so easy to add all TUYA devices just inserting the tuya account details… and most of many thermostats work correctly… just one model (by another company) has this issue.
How can I fix it without adding too much coding?
Thanks

Easiest solution is to get a new thermostat, like the ones you have. :slight_smile:

The other solution is to create a custom component of the tuya component (copy the files from the tuya component is the custom_components folder, rename the folder to something like tuya-float, and make the modifications above. No coding, just editing the files).

Since you have thermostats that are working fine and one that has a problem, you need two different components. The modifications above don’t allow for two thermostats with different division options (I hope that @rogermiret will add that to his Pull Request).

Ciao Marcel, thanks for your reply.
well… the ones that work are valves’ component of heating… the one with the issue is the thermostat.
So, thermostat must work correctly… I cannot configure only the thermostat with a different profile? any help? Can I configure it within my LAN as component out of Tuya cloud? thanks for support

Hello All,

I have done and tried what the manual says but with no luck. I read most of your comments and tried everything with no luck. I added the HACS from the Github site. Put all the file structure that you are suggesting (https://bit.ly/2XR0SN1), but the problem is when i put the manifest.json file i get the following error.

When i take it off i get the temperature doubled eg 40 C. I am using a thermostat (https://www.aliexpress.com/item/4000265648461.html?spm=a2g0s.9042311.0.0.292a4c4d0t8Pfc)

I am running the HA on VMware and i am at version 0.108.6
I am eager to any suggestions,
Thanks

So I just put my AC unit back in as the temps are rising, and I took the time to figure out what was going on. I mapped the results from HA/Tuya and what the AC was showing:

162 = 72’
160 = 71’
158 = 70’
156 = 69’
154 = 68’
153 = 67’
151 = 66’

After a little algebra, I figured out that that my results reminded me of an equation I already knew:
(C × 9/5) + 32 = F

So, it looks like Tuya was returning the result in Fahrenheit, but assuming it was Celsius and converting that value to Fahrenheit.

My fix in tuya/climate.py was to change:

     @property
     def temperature_unit(self):
         """Return the unit of measurement used by the platform."""
         unit = self.tuya.temperature_unit()
         if unit == "FAHRENHEIT":
             return TEMP_FAHRENHEIT
         return TEMP_CELSIUS

To:

     @property
     def temperature_unit(self):
         """Return the unit of measurement used by the platform."""
         unit = self.tuya.temperature_unit()
         return TEMP_FAHRENHEIT
1 Like

Mi thermostat was working fine up until a few updates before, now i have the target and current temperatures doubled again, and aplying the modifications in climate.py does nothing.
And i now see that there is new custom component files (https://github.com/home-assistant/core/tree/dev/homeassistant/components/tuya). Are these the ones i have to download and modify?. Any help would be appreciated!!.

Mi thermostat was working fine up until a few updates before, now i have the target and current temperatures doubled again, and aplying the modifications in climate.py does nothing.
And i now see that there is new custom component files (https://github.com/home-assistant/core/tree/dev/homeassistant/components/tuya ). Are these the ones i have to download and modify?. Any help would be appreciated!!.

Overwrite the tuya folder in custom components with the new tuya component from GitHub repo.

Then edit climate.py

from

    @property
    def current_temperature(self):
        """Return the current temperature."""
        return self._tuya.current_temperature()

    @property
    def target_temperature(self):
        """Return the temperature we try to reach."""
        return self._tuya.target_temperature()

to

    @property
    def current_temperature(self):
        """Return the current temperature."""
        temp = float(self._tuya.current_temperature())/2
        return temp

    @property
    def target_temperature(self):
        """Return the temperature we try to reach."""
        temp = float(self._tuya.target_temperature())/2
        return temp

Please note that Tuya configuration is now done via frontend (Configuration -> Integrations in the UI, click the button with + sign and from the list of integrations select Tuya)
So remove Tuya code from configuration.yaml

Many thanks for your work done on Tuya integration within HA. Now it displays the right temperature in HA and after modification of target_temperature_step I am able to set teperature to half degree C steps.

Thanks man!. Working just perfect!

Hi I just setup Tuya configuration from Configuration → Integrations. I registered my Thermostat there sucess, however I have the temperature double issue, my appologies but I couldn´t fine the climate.py file to do the change that you mention as workaurond. Can you please support me how to find it or solve this issue
Best Regards

You have to create a folder named “tuya” inside custom components folder, then download inside tuya folder the files from Github repo, as described in post #93 by yashijoe (i did exactly as he sasys, step by step, and it worked like a charm). Then you´ll find climate.py inside tuya folder.

Thanks Rafael for your reply, but how can I download these files? It tried as “save link as” but the file saved is not the same if I click on climate.py for instance
Best regards

ahora se integra desde integraciones