Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tuya thermostat not showing the current temperature #78669

Open
ZTHawk opened this issue Sep 17, 2022 · 24 comments
Open

Tuya thermostat not showing the current temperature #78669

ZTHawk opened this issue Sep 17, 2022 · 24 comments

Comments

@ZTHawk
Copy link

ZTHawk commented Sep 17, 2022

The problem

Hello,
I have a thermostat but it is not displaying the current temperature.
It does show the temperature that is set (target temperature).
Here is a screenshot of the values (current_temperature is "null").
grafik

In the Tuya app the current temperature is displayed correctly.

What version of Home Assistant Core has the issue?

2022.9.4

What was the last working version of Home Assistant Core?

N/A

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Tuya

Link to integration documentation on our website

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

Diagnostics information

config_entry-tuya-c3222114e3ef9f88ce352816cf48da78.json.txt

Example YAML snippet

N/A

Anything in the logs that might be useful for us?

N/A

Additional information

N/A

@probot-home-assistant
Copy link

Hey there @tuya, @zlinoliver, @frenck, mind taking a look at this issue as it has been labeled with an integration (tuya) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)


tuya documentation
tuya source
(message by IssueLinks)

@Westeru
Copy link

Westeru commented Sep 20, 2022

Have you found any solution for this matter?

@ZTHawk
Copy link
Author

ZTHawk commented Sep 27, 2022

No I have no solution or workaround.
This means I cannot use the integrated teperature for automations.

@mirasu

This comment was marked as abuse.

@frenck
Copy link
Member

frenck commented Oct 16, 2022

@mirasu Please only comment in the English language. Thanks 👍

@coleburg
Copy link

I am also experiencing this issue, i am happy to help the devs in anyway to get this resolved, thanks

@SaSa1983
Copy link
Contributor

SaSa1983 commented Nov 2, 2022

@frenck how about adding a helper (climate multiplier) allowing to set factors for existing thermostats values

min_temp: 5
max_temp: 5
target_temp_step: 1
current_temperature: 5
temperature: 5
...

this example would solve thermostats only showing a fifth of the actual temperature.
This helper would create a entity with the applied factors and call the services of the original (wrong) entity to set temperature...

The "wizard" could also ask to hide the original entity

@coleburg
Copy link

coleburg commented Nov 3, 2022

I can confirm this is an issue in 2022.11.0 too

@dayt47
Copy link

dayt47 commented Nov 21, 2022

I have the same problem with the Tuya TS0601. Can't see the current temperature in entities.

@MacManas
Copy link

Looking at how my device changes according to the values in HA, I think @SaSa1983 seems like a simple but effective solution. I'm actually looking to do so myself for this entity since the existing one is not very useful

@Stevehans
Copy link

Seeing similar here, looks to be 5x lower than it is

@coleburg
Copy link

coleburg commented Feb 9, 2023

Also same issue, current_temperature showing null, is anyone trying to resolve this? been open a long time.

@coleburg
Copy link

I have found the current temp listed in the Tuya API as "code": "RoomTemper", can this be added please?

@Matthias0705
Copy link

Also facing the same issue. Had anyone already a solution maily to get the current temperature?

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@ZTHawk
Copy link
Author

ZTHawk commented Jun 4, 2023

I have updated to a Zigbee device, so this is not applicable to me. Never the less, I suppose this issue is not yet fixed.

@nmajin
Copy link

nmajin commented Jun 27, 2023

RoomTemper

I was messing around with adding a TuyaSensorEntityDescription:

# Heater
# https://developer.tuya.com/en/docs/iot/categoryqn?id=Kaiuz18kih0sm
"qn": (
TuyaSensorEntityDescription(
key=DPCode.WORK_POWER,
name="Power",
device_class=SensorDeviceClass.POWER,
state_class=SensorStateClass.MEASUREMENT,
),
),

And seems like it does add the current temp now (°F in my case):

    # Heater
    # https://developer.tuya.com/en/docs/iot/categoryqn?id=Kaiuz18kih0sm
    "qn": (
        TuyaSensorEntityDescription(
            key=DPCode.WORK_POWER,                         
            name="Power",              
            device_class=SensorDeviceClass.POWER,
            state_class=SensorStateClass.MEASUREMENT,
        ),
        TuyaSensorEntityDescription(
            key=DPCode.TEMP_CURRENT_F,                                      
            name="Temperature",                             
            device_class=SensorDeviceClass.TEMPERATURE,
            state_class=SensorStateClass.MEASUREMENT,
        ),             
    ), 

I was suspecting that ha is missing it in the component from how it calls the dpcode here:

def current_temperature(self) -> float | None:
"""Return the current temperature."""
if self._current_temperature is None:
return None
temperature = self.device.status.get(self._current_temperature.dpcode)
if temperature is None:
return None
if self._current_temperature.scale == 0 and self._current_temperature.step != 1:
# The current temperature can have a scale of 0 or 1 and is used for
# rounding, Home Assistant doesn't need to round but we will always
# need to divide the value by 10^1 in case of 0 as scale.
# https://developer.tuya.com/en/docs/iot/shift-temperature-scale-follow-the-setting-of-app-account-center?id=Ka9qo7so58efq#title-7-Round%20values
temperature = temperature / 10
return self._current_temperature.scale_value(temperature)

https://developer.tuya.com/en/docs/iot/s?id=K9gf48r1eqi4s

Target Temp and the historical graph are way off...this does seem to all be misconfigured on the ha side here. I am going to at least see if I can request the TuyaSensorEntityDescriptions in a PR to get at least the current temp reading working. Crazy it is just a simple code change there...

@rici44
Copy link

rici44 commented Aug 16, 2023

Rapid Fairland Pool Heat Pump with Tuya modul is showing the same value in min_temp: -22 as in current_temperature: -22

Screenshot 2023-08-16 at 21 55 45

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@Mink2781
Copy link

I also have this problem - current temperature = NULL. Anyone got a workaround?

@tvvalbonne
Copy link

Hi, same issue here

@coleburg
Copy link

https://github.com/tuya, @zlinoliver , @frenck, please can someone look at this, its been 2 years

@coleburg
Copy link

Does anyone look into Tuya issues?

@szeleneyr
Copy link

same issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests