Sonoff TH16 Temperature Units

My Sonoff TH16 implementation in HA has a peculiarity. Initially when incorporated in a Lovelace entity card the termperature was expressed in Centigrade values not Fahrenheit. It switched modes when I changed to Units value from F to C in the HA configuration file. This makes no sense of course but it worked. At one point It changed again to reporting °C and I restored the configuration file to its original state. This switching from F to C and back happens from time to time. This is not the units value that shows up in the entity card, that always follows the setting in the entity card units. The value that is displayed is quite obviously in the wrong range for °F when it goes wrong.
When the card display entity is tapped, the graphical display is shown where the value is always correct. Also in the EweLink app the value is always correctly displayed in °F. No editing of anything involving the Sonoff integration has been done except as indicated and that was months ago. in the mean time it has once again reverted to expressing the temperature in the centigrade range. Has anyone else experienced this?

Problem solved:
This problem was solved by removing the ‘temperature’ attribute from the yaml code on the entity card.

Can you show your yaml code for your entity card? I’m having the same issue but I don’t see where to make this change…

Here’s mine…my gas water heater is showing deg F (correct) but my Sonoff TH16 sensor is showing deg C.

Thanks

My entities card code does not look any different than yours. When you look at the sensor entity in HA configuration, is the temperature in °C as well?
Have you set the temperature units to °F in the eWeLink app?
I do remember chasing this around at one time, where the units were displayed in °F but the numbers were clearly centigrade values.
Open the sensor in the Developer Tools/States tool and check the attributes list for the unit_of_measurement attribute. I do not think this causes the Sonoff device to report differently, only the units that are displayed but it could be a clue as to what the sensor is reporting. The eWeLink setting is the one that changes the data as far as I know. If it is already set to °F, try setting it to °C and then back. Perhaps it did not update correctly. I do not know how that would happen but poorly designed firmware could make it happen.