I have a weather station that publishes temp data to a MQTT Broker that this Homey device pulls the temp from. The phone and web app randomly switches from thinking that the temp/number pulled is F to C. Later it will switch to displaying the correct value. Pretty sure it isn’t 122 degrees here in the PNW. Has anyone else seen this behavior or have any suggestions? Thanks!
Every app provides temperature data in ºC, and Homey automatically converts it to ºF based on your location. Is your location set correctly in More->Settings->Location?
I forgot to mention that if I open Insights for the temp, the graph is correct and doesn’t have any spikes into the 100’s of degrees. It has also never displayed the incorrect temperature at the top of the Home page where it says “Good Morning, Scott!” and the temp and weather conditions. The random issue happens when connecting to the local SHS address using admin account and my.homey.app (on local network and on cellular/remote).
Home Assistant has been subscribed to the same Temp MQTT Broker topic for years and has never converted the temp to C so I don’t think there are any issues on the Broker/MQTT side.
It’s not an issue with the device sending the data, since temperatures are always provided by the apps in ºC, after which Homey converts it automatically to ºC or ºF, depending on your location.
Correct. Homey receives F, thinks it is C and converts it. I don’t think it is anything on the MQTT side because Home Assistant has never done this, data being published to the broker hasn’t changed, and this is a screen shot showing the temp directly from the Broker. I left the app open on my phone and it went from displaying the correct temp to incorrect temp (120+) and back to correct over the course of about 10 minutes.
I think I just figured something out. The temp display in Homey switches to 100+ degrees when the Homey MQTT Temp device gets an updated temperature from the Broker. If I then do a Web page refresh the temperature reverts to the correct temp. Another clue to the root cause; if Broker receives exact same temperature, the temperature in Homey doesn’t switch to the 100+ degree temp. But if there is a temperature change Homey will display the incorrect temp until the page is refreshed.
I added the conversion code and now if the web page is refreshed or the app is opened on my phone the temperature (in F) has been converted to C. If the broker receives an updated temperature the temperature will revert to being displayed correctly. The MQTT Broker receives the temp in F.
And it causes a new issue. The temp recorded in Homey Insights for the temperature device is now in C not F. The Insights data had always been correct until adding the conversion to the temperature device.