04-29-2024 07:10
04-29-2024 07:10
Dear there,
The data from tempSkin API doesn't match mobile App. Please check the meta data and screenshot.
```
{ "tempSkin": [ { "dateTime": "2024\-04\-19", "value": { "nightlyRelative": 0.0 }, "logType": "dedicated_temp_sensor" }, { "dateTime": "2024\-04\-22", "value": { "nightlyRelative": -0.6 }, "logType": "dedicated_temp_sensor" }, { "dateTime": "2024\-04\-23", "value": { "nightlyRelative": -0.0 }, "logType": "dedicated_temp_sensor" }, { "dateTime": "2024\-04\-24", "value": { "nightlyRelative": 0.0 }, "logType": "dedicated_temp_sensor" } ] }
```
04-29-2024 08:12
04-29-2024 08:12
When calling the skin temperature endpoint, are you specifying the accept-language header? From the testing I have done, it looks like the default response is in celcius. If you specify the accept-language=en_US, the response is in fahrenheit, which is what the data in the mobile application is showing.
In the documentation, we state the nightlyRelative value is "It is displayed to the user as a delta from their baseline temperature in degrees Celsius or Fahrenheit depending on the country specified in the Accept-Language header."
04-29-2024 15:39
04-29-2024 15:39
Thanks @Gordon-C
It works if I specify the accept-language=en_US.
Do you know how could I convert a Celsius nightlyRelative value to Fahrenheit?
04-29-2024 20:54
04-29-2024 20:54
I'm confused by your question because skin temperature only returns the nightlyRelative value, and that was the information I provided in my previous post. If you're thinking of the core temperature's value, you should use the same header. See Core Temperature Response.
05-01-2024 20:12
05-01-2024 20:12
Hi @Gordon-C
The different values are caused by different units(celcius vs fahrenheit).
So, in my example above(April-22: -1.0 v -0.6)
-1.0 is fahrenheit value
-0.6 is celcius value
I am wondering how to convert the values between fahrenheit unit and celcius unit.
05-02-2024 08:42
05-02-2024 08:42
The values returned represent an average temperature change over the course of the sleep log. I don't think you'll be able to implement a simple calculation to convert the values. The best way to get the fahrenheit unit and celcius unit is applying the appropriate Accept-Language header value. en_US will return fahrenheit units. Anything else or not using the header will return metric units. See Unit Systems.