core: Incorrect current temperature reported for MoesGO thermostat

The problem

I’m testing on 2022.2.7 with manually updated Tuya integration. I’ve updated const.py, base.py, and climate.py files in the container downloading the up-to-date versions from GH (after #66644 and #66664 were merged).

Now I can see the correct set temperature, and after the latest Franck’s changes, I can see the current temperature as well. Unfortunately, the current temperature is reported ten times higher than it should be (i.e. I see 205º in the interface instead of 20.5º).

What version of Home Assistant Core has the issue?

2022.2.7*

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

tuya

Link to integration documentation on our website

https://home-assistant.io/integrations/tuya/

Diagnostics information

tuya-0a7c3fe5f5a2ca10ae2c7940f0294f47-thermostat (bedroom)-26a4d8179754d03cee8d056aa6df8579.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 32 (12 by maintainers)

Most upvoted comments

Can I make a suggestion please? Would it be possible to have an optional parameter for thermostats that gives the scale to use for temperature readings (with an appropriate default) and maybe something similar for the set temperature? Ideally somewhere easy to modify (ie in the UI)? This would ensure even if there is a change in future users can immediately update it. Defensive programming! 😃

in fact, before the adoption of the new tuya api it was like this

I just double checked in HA 2022.8 for me

  • Current Temp is 10x higher than it should be (fixed with this issue)
  • Other values (set_temp, min, max, step) are correct
  • Setting the thermostat temperature as well as turning it off / on works

The implementation will then be acording to tuya developer guides. For all who have a diverging current temperature, please await the update including the corresponding PR #66715 .

If you’re still having issues afterwards please be so kind to create separate issues with diagnostic files. We’ll take a look into them afterwards

According to a quick investigation by @SaSa1983 — it looks like the device works not up to the specs.

I’ve raised this with Tuya’s support, waiting for the response.

Nope it is okay that current temperature has a scale of zero… this tells the API reader not to round the value to the closest int. This will be fixed in a separate commit. We need handle current_temp and upper_temp with a safeguard for scale…

You already raised an issue… We’ll fix this seperately