Tuya Based WiFi Thermometer Only DIsplays Celsius

The WiFi Thermometer I purchased on Amazon is a generic Unknown brand using Tuya and was immediately picked by my Tuya phone app and the Tuya Integration in Home Assistant.
All great.
However it reads in Celsius and I want Fahrenheit .
The display on the little unit displays in Fahrenheit but not in HA.
Any suggestions very much appreciated.
I’m not real savvy in code changes, so please keep it simple.
Thanks in advance…

What does your General Settings show ?

Curious where that setting is?
I do have a Broadlink IR4 device that transmits Temp and humidity in Fahrenheit.
Just not the Tuya Wi-Fi thermometer.
I’ll see if I can find that “General Settings” Unit settings?

It’s right where you set your location. Like where the map is.

Look for Configuration – General Configuration

Looks good here… So not the problem I guess ?
I’m thinking it’s somehow in the Tuya Integration. Any other thoughts ?

Did you hit SAVE ? Can you share the Amazon link for your device ?

Yes I did hit save and nothing changed.
The device works perfectly with Alexa (In Fahrenheit) and also on the display and in the Tuya Smart Life App. It also doesn’t use batteries, USB adapter. For $21 I am very impressed with it.

you can make a sensor using a template and convert it to Celsius?

Not a clue what you meant here.
I know nothing about template’s.
I want to see the temperature in Fahrenheit not Celsius.

The answer to your question may be here my friend ?

Just curious, can you paste this code into a Manual Card and show your output when you select it please.

type: button
tap_action:
  action: more-info
entity: weather.home_hourly

Sure I’ll give your test code in a Manual Card.
Here’s something I found out about Tuya in Home Assistant.
Anything worthwhile here ?

Not sure my friend, may be of interest for you to follow and add your input there too. Could you kindly share how you have HA running.

Results are here… It won’t work says the following…
“Entity not available: weather.home_hourly”

As for my Setup it’s running on a Raspberry Pi 3B+

This was posted jut 4 days ago. Perhaps a bug in the Tuya Integration as this is exactly whats happening in my setup. Displays “F” on the LCD screen, and the Tuya App, even TasmotaAdmin, but on HA it’s in “C”

eugenet8k commented 4 days ago

@frenck well, my humidity and temperature sensor definitely operates in F at the LCD screen and in the SmartLife app. Moreover, when I used the HACS extension GitHub - tuya/tuya-home-assistant: Home Assistant integration for controlling Powered by Tuya (PBT) devices using Tuya Open API, maintained by the Home Assistant Community and Tuya Developer Team. it also reports temperature in F. Only this official integration makes it reporting in C. So I put A + B + C and concluded the bug is in this integration code.

Possibility my friend. Maybe share your input there to help out. Surprised you have no weather entity. Just wanted to see which unit of measure you had set. Thought it was standard. Let us know how you get on.

So to convert a celsius sensor to fahrenheit you can use a template like this:

sensor:
  - platform: template
    sensors:
      sensor_fahrenheit:
        unit_of_measurement: 'F'
        friendly_name: Fahrenheit Temperature
        value_template: '{{ "%.2f"|format((( states("sensor.sensor_celsius") | float ) * 1.8) + 32 ) }}'
1 Like

Hey guys, brand new to HA yesterday! I’m having the same issue with the same Tuya thermostat. Shows F on the display, tells me F in Alexa…but shows up C in HA. I just added the suggested card to the dashboard, so I don’t know anything about “templates” as of yet. Is that something I should learn to convert this Tuya card to F? I do see this on the tuya integrations page. Seems like it’s set to C there:

Standard Instruction SetStandard Status Set
Code
Type
Values
va_temperature	Integer	
{
  "unit": "℃",
  "min": -200,
  "max": 600,
  "scale": 1,
  "step": 1
}
humidity_value	Integer	
{
  "unit": "%",
  "min": 0,
  "max": 100,
  "scale": 0,
  "step": 1
}
temp_unit_convert	Enum	
{
  "range": [
    "c",
    "f"
  ]
}

I wonder if it’s something I could/should change right there at the source??

I’m pretty sure there is a bug in the Tuya Integration.
I believe it’s going to be fixed in an future update. I’ve reposed the link. Hope that helps.

This was posted jut 4 days ago. Perhaps a bug in the Tuya Integration as this is exactly whats happening in my setup. Displays “F” on the LCD screen, and the Tuya App, even TasmotaAdmin, but on HA it’s in “C”

eugenet8k commented 4 days ago

@frenck well, my humidity and temperature sensor definitely operates in F at the LCD screen and in the SmartLife app. Moreover, when I used the HACS extension GitHub - tuya/tuya-home-assistant: Home Assistant integration for controlling Powered by Tuya (PBT) devices using Tuya Open API, maintained by the Home Assistant Community and Tuya Developer Team. it also reports temperature in F. Only this official integration makes it reporting in C. So I put A + B + C and concluded the bug is in this integration code.

2 Likes

Special thanks for this code! I have 4 tuya temperature sensors that are only displaying celsius. Couple of questions, first - do I have to create a separate template for each device in order to convert? Also, how can I edit the code to round the result to the nearest whole degree, rather than two decimals?

Shawn