Tuya Temperature Incorrect on Fahrenheit system
The problem
I'm kindof frustrated, as I wrote the code to fix this, and it looks like my change was reverted during a refactor. (Code is still there, but isn't executed anymore)
On my Tuya integration, because my device reports temperatures in Fahrenheit, and my system is in Fahrenheit, I DO NOT need the Celcius to Fahrenheit conversion.
My device does not report its temperature unit via Tuya's data payload. So the implementation MUST allow for configurability of the fallback temperature unit. My code change lost, would key off of HA's configured temperature unit.
What version of Home Assistant Core has the issue?
2024.8.2
What was the last working version of Home Assistant Core?
2024.7.0
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
{
"home_assistant": {
"installation_type": "Home Assistant OS",
"version": "2024.8.2",
"dev": false,
"hassio": true,
"virtualenv": false,
"python_version": "3.12.4",
"docker": true,
"arch": "aarch64",
"timezone": "America/Los_Angeles",
"os_name": "Linux",
"os_version": "6.6.31-haos-raspi",
"supervisor": "2024.08.0",
"host_os": "Home Assistant OS 12.4",
"docker_version": "26.1.4",
"chassis": "embedded",
"run_as_root": true
},
"custom_components": {
"nicehash": {
"documentation": "https://github.com/RomRider/ha_nicehash",
"version": "0.0.5",
"requirements": []
},
"pitboss": {
"documentation": "https://github.com/dknowles2/ha-pitboss",
"version": "2024.6.3",
"requirements": [
"pytboss==2024.6.1"
]
},
"vesync": {
"documentation": "https://www.home-assistant.io/integrations/vesync",
"version": "1.3.0",
"requirements": [
"pyvesync==2.1.10"
]
},
"ytube_music_player": {
"documentation": "https://github.com/KoljaWindeler/ytube_music_player",
"version": "20220205.01",
"requirements": [
"ytmusicapi==0.19.5",
"pytube==10.5.1",
"integrationhelper==0.2.2"
]
},
"localtuya": {
"documentation": "https://github.com/rospogrigio/localtuya/",
"version": "5.2.1",
"requirements": []
},
"tplink_deco": {
"documentation": "https://github.com/amosyuen/ha-tplink-deco",
"version": "3.6.2",
"requirements": [
"pycryptodome>=3.12.0"
]
},
"mass": {
"documentation": "https://music-assistant.io",
"version": "2024.8.0",
"requirements": [
"music-assistant==2.1.3"
]
},
"owlet": {
"documentation": "https://github.com/jlamendo/ha-sensor.owlet",
"version": "1.0.0",
"requirements": [
"PyJWT",
"gcloud",
"sseclient",
"requests_toolbelt"
]
},
"alexa_media": {
"documentation": "https://github.com/alandtse/alexa_media_player/wiki",
"version": "4.12.7",
"requirements": [
"alexapy==1.28.2",
"packaging>=20.3",
"wrapt>=1.14.0"
]
},
"meross_lan": {
"documentation": "https://github.com/krahabb/meross_lan",
"version": "5.3.1",
"requirements": []
},
"rpi_gpio": {
"documentation": "https://github.com/thecode/ha-rpi_gpio",
"version": "2022.7.0",
"requirements": [
"RPi.GPIO==0.7.1"
]
},
"pura": {
"documentation": "https://github.com/natekspencer/hacs-pura",
"version": "0.5.0",
"requirements": [
"pypura==0.1.23",
"deepdiff",
"ical"
]
},
"grocy": {
"documentation": "https://github.com/custom-components/grocy",
"version": "v4.11.1",
"requirements": [
"pygrocy==2.0.0"
]
},
"powercalc": {
"documentation": "https://docs.powercalc.nl",
"version": "v1.14.2",
"requirements": [
"numpy>=1.21.1"
]
},
"remote_homeassistant": {
"documentation": "https://github.com/custom-components/remote_homeassistant",
"version": "4.2",
"requirements": []
},
"hacs": {
"documentation": "https://hacs.xyz/docs/configuration/start",
"version": "1.34.0",
"requirements": [
"aiogithubapi>=22.10.1"
]
},
"toyota_na": {
"documentation": "https://github.com/widewing/ha_toyota_na",
"version": "2.2.1",
"requirements": [
"toyota-na==2.1.1"
]
},
"sonoff": {
"documentation": "https://github.com/AlexxIT/SonoffLAN",
"version": "3.7.3",
"requirements": [
"pycryptodome>=3.6.6"
]
}
},
"integration_manifest": {
"domain": "tuya",
"name": "Tuya",
"codeowners": [
"Tuya",
"zlinoliver",
"frenck"
],
"config_flow": true,
"dependencies": [
"ffmpeg"
],
"dhcp": [
{
"macaddress": "105A17*"
},
{
"macaddress": "10D561*"
},
{
"macaddress": "1869D8*"
},
{
"macaddress": "381F8D*"
},
{
"macaddress": "508A06*"
},
{
"macaddress": "68572D*"
},
{
"macaddress": "708976*"
},
{
"macaddress": "7CF666*"
},
{
"macaddress": "84E342*"
},
{
"macaddress": "D4A651*"
},
{
"macaddress": "D81F12*"
}
],
"documentation": "https://www.home-assistant.io/integrations/tuya",
"integration_type": "hub",
"iot_class": "cloud_push",
"loggers": [
"tuya_iot"
],
"requirements": [
"tuya-device-sharing-sdk==0.1.9"
],
"is_built_in": true
},
"setup_times": {
"null": {
"setup": 7.601792458444834e-05
},
"2ef4817da75195c34b16098303916c81": {
"wait_import_platforms": -8.611324536032043,
"wait_base_component": -0.004103690036572516,
"config_entry_setup": 11.658019479946233
}
},
"data": {
"endpoint": "https://apigw.tuyaus.com",
"terminal_id": "1709924905179zOnmX9",
"mqtt_connected": true,
"disabled_by": null,
"disabled_polling": false,
"id": "ebd2ab6e86f707cd87asdt",
"name": "Mini-Split",
"category": "kt",
"product_id": "wxqdp6ecfkd78zzz",
"product_name": "Air Conditioner",
"online": true,
"sub": false,
"time_zone": "-07:00",
"active_time": "2024-07-06T03:42:10+00:00",
"create_time": "2024-07-06T03:42:10+00:00",
"update_time": "2024-07-06T03:42:10+00:00",
"function": {
"switch": {
"type": "Boolean",
"value": {}
},
"temp_set": {
"type": "Integer",
"value": {
"unit": "\u2103/F",
"min": 160,
"max": 900,
"scale": 1,
"step": 10
}
},
"mode": {
"type": "Enum",
"value": {
"range": [
"cold",
"hot",
"wet",
"wind",
"auto"
]
}
},
"mode_eco": {
"type": "Boolean",
"value": {}
},
"heat": {
"type": "Boolean",
"value": {}
},
"light": {
"type": "Boolean",
"value": {}
},
"lock": {
"type": "Boolean",
"value": {}
},
"switch_horizontal": {
"type": "Boolean",
"value": {}
},
"sleep": {
"type": "Boolean",
"value": {}
},
"health": {
"type": "Boolean",
"value": {}
}
},
"status_range": {
"switch": {
"type": "Boolean",
"value": {}
},
"temp_set": {
"type": "Integer",
"value": {
"unit": "\u2103/F",
"min": 160,
"max": 900,
"scale": 1,
"step": 10
}
},
"temp_current": {
"type": "Integer",
"value": {
"unit": "\u2103/F",
"min": -300,
"max": 1760,
"scale": 1,
"step": 10
}
},
"mode": {
"type": "Enum",
"value": {
"range": [
"cold",
"hot",
"wet",
"wind",
"auto"
]
}
},
"mode_eco": {
"type": "Boolean",
"value": {}
},
"heat": {
"type": "Boolean",
"value": {}
},
"light": {
"type": "Boolean",
"value": {}
},
"lock": {
"type": "Boolean",
"value": {}
},
"power_consumption": {
"type": "Integer",
"value": {
"unit": "kW\u00b7h",
"min": 0,
"max": 255,
"scale": 0,
"step": 1
}
},
"switch_horizontal": {
"type": "Boolean",
"value": {}
},
"sleep": {
"type": "Boolean",
"value": {}
},
"health": {
"type": "Boolean",
"value": {}
}
},
"status": {
"switch": false,
"temp_set": 660,
"temp_current": 690,
"mode": "cold",
"mode_eco": false,
"heat": false,
"light": false,
"lock": false,
"power_consumption": 0,
"switch_horizontal": false,
"sleep": false,
"health": false
},
"home_assistant": {
"name": "Mini-Split",
"name_by_user": null,
"disabled": false,
"disabled_by": null,
"entities": [
{
"disabled": false,
"disabled_by": null,
"entity_category": null,
"device_class": null,
"original_device_class": null,
"icon": null,
"original_icon": null,
"unit_of_measurement": null,
"state": {
"entity_id": "climate.mini_split",
"state": "off",
"attributes": {
"hvac_modes": [
"off",
"cool",
"heat",
"dry",
"fan_only",
"heat_cool"
],
"min_temp": 61,
"max_temp": 194,
"target_temp_step": 1.0,
"swing_modes": [
"off",
"horizontal"
],
"current_temperature": 156,
"temperature": 151,
"swing_mode": "off",
"friendly_name": "Mini-Split",
"supported_features": 417
},
"last_changed": "2024-08-17T13:38:47.385002+00:00",
"last_reported": "2024-08-17T13:38:47.385002+00:00",
"last_updated": "2024-08-17T13:38:47.385002+00:00"
}
},
{
"disabled": false,
"disabled_by": null,
"entity_category": "config",
"device_class": null,
"original_device_class": null,
"icon": null,
"original_icon": null,
"unit_of_measurement": null,
"state": {
"entity_id": "light.mini_split_backlight",
"state": "off",
"attributes": {
"supported_color_modes": [
"onoff"
],
"color_mode": null,
"friendly_name": "Mini-Split Backlight",
"supported_features": 0
},
"last_changed": "2024-08-17T13:38:47.390243+00:00",
"last_reported": "2024-08-17T13:38:47.390243+00:00",
"last_updated": "2024-08-17T13:38:47.390243+00:00"
}
},
{
"disabled": false,
"disabled_by": null,
"entity_category": "config",
"device_class": null,
"original_device_class": null,
"icon": null,
"original_icon": null,
"unit_of_measurement": null,
"state": {
"entity_id": "switch.mini_split_child_lock",
"state": "off",
"attributes": {
"friendly_name": "Mini-Split Child lock"
},
"last_changed": "2024-08-17T13:38:47.427298+00:00",
"last_reported": "2024-08-17T13:38:47.427298+00:00",
"last_updated": "2024-08-17T13:38:47.427298+00:00"
}
}
]
},
"set_up": true,
"support_local": true
}
}
Example YAML snippet
NA
Anything in the logs that might be useful for us?
This was my commit to fix the issue in the past:
https://github.com/home-assistant/core/commit/04bc8e09a5892cb804aac166f8dcd697f949095b
The PR I submitted to fix the issue in the past:
#108050
Additional information
No response
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!
Code owner commands
Code owners of tuya can trigger bot actions by commenting:
-
@home-assistant closeCloses the issue. -
@home-assistant rename Awesome new titleRenames the issue. -
@home-assistant reopenReopen the issue. -
@home-assistant unassign tuyaRemoves the current integration label and assignees on the issue, add the integration domain after the command. -
@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue. -
@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
tuya documentation tuya source (message by IssueLinks)
Hey there @markperdue, @webdjoe, @thegardenmonkey, @cdnninja, mind taking a look at this issue as it has been labeled with an integration (vesync) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of vesync can trigger bot actions by commenting:
-
@home-assistant closeCloses the issue. -
@home-assistant rename Awesome new titleRenames the issue. -
@home-assistant reopenReopen the issue. -
@home-assistant unassign vesyncRemoves the current integration label and assignees on the issue, add the integration domain after the command. -
@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue. -
@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
vesync documentation vesync source (message by IssueLinks)
@home-assistant unassign vesync
After investigating, this looks more like an issue with how Tuya reports the data, as well as changes from how the Tuya integration handles preferred temperature units. I submitted a draft PR #124121 which should fix this. Unfortunately I don't have a development environment to validate. (I'm out of town, and have my wedding coming up)
Hello. Have you made any progress with this issue? I have 2 ITC-308 Wifi devices (both purchased from Amazon but at different times) One of them is converting the displayed set temperature from C to F even though it is F on the device. So to set it to 35F I have to set it to 95F in my dashboard. (I think the integration thinks it's converting my change from F and sending the set temp in C but the device is receiving it in F) If you have any sort of workaround to correct this I would appreciate it. I've opened help threads and tried reporting this bug more than once but I have not been able to find a solution or work around.
EDIT: I forgot to mention that the other ITC device works as expected and the one with the problem is showing the sensor temp correctly. It's only the set temp that is an issue for me.
I'm having the same problem and am hoping for a fix but it only occurs on some temperature/thermostat devices. A mini split has a set temperature of 68F but HA shows a setpoint of 154F (so 68F is getting read as 68C). The JSON diagnostics data does show the incorrect "temperature": 154,
"home_assistant": { "name": "Back Mini Split", "name_by_user": null, "disabled": false, "disabled_by": null, "entities": [ { "disabled": false, "disabled_by": null, "entity_category": null, "device_class": null, "original_device_class": null, "icon": null, "original_icon": null, "unit_of_measurement": null, "state": { "entity_id": "climate.back_mini_split", "state": "heat", "attributes": { "hvac_modes": [ "off", "cool", "heat", "dry", "fan_only", "heat_cool" ], "min_temp": 61, "max_temp": 190, "target_temp_step": 0.5, "current_temperature": 48, "temperature": 154, "current_humidity": 0, "friendly_name": "Back Mini Split", "supported_features": 385
The readings are correct in the SmartLife app itself. My HeatStorm heaters (uses Smartlife) are showing correct values.
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.
Definitely not resolved. In fact, there doesn't seem to be any movement on the Tuya integration. Appears to be dead/abandoned.
Definitely not resolved. In fact, there doesn't seem to be any movement on the Tuya integration. Appears to be dead/abandoned.
Considering the ubiquity of Tuya/Smartlife devices in the home automation space, it's very concerning that they're being neglected by HomeAssistant.
I'm also still having the same problem and my HA and all add-ons are updated to latest versions.
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.
It's still an issue, but it looks like the Tuya integration has been abandoned.
Has it really been abandoned? I did add #141956 to fix the issue, but it hasn't been reviewed...
What a shame that HomeAssistant has abandoned the Tuya/SmartLife ecosystem that has a massive number of devices. Thanks for trying to fix the temperature problem DellanX. It's something that I was really hoping for.
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.
Very much still an issue with an open PR to fix it
Looks like the PR aged out and auto closed. Probably worth reopening a new one so it will be in queue for review.