Answered! Go to the Best Answer.
Best AnswerI already deleted the weather code from the clock face.
since it was overlapping with other elements, people were not pleased.
I will try to add this code to another clock face soon, I still want to make it work. Just don’t know why I did not see any weather and also no errors or anything in the console. I will test it out again soon!
Best Answer
Fitbit Product Experts Alumni are retired members of the Fitbit Product Expert Program. Learn more
I have setup a repository in github (https://github.com/gpfrello/FitbitOS_weather_clock) where I implemented my little weather code into a very basic digital clockface.
The next planned updates are the following (meaning I have a lot to learn!):
- implement weather as a external module
- implement icons for weather
- implement settings
- implement a code to make a sort of visualization when weather is updating and display of time of last update.
Best AnswerI made a new application on my computer with CLI (VS Code). Now your code is working fine. Before I tested it on Fitbit Studio, then I did not see it working.
So I was porbably the only stupid one still using Studio 😄
does the temperature change atomatically to fahrenheit? Or does it only show celsius?
Best Answer
Fitbit Product Experts Alumni are retired members of the Fitbit Product Expert Program. Learn more
Hello @innak and sorry for late reply (I missed your post).
The code as it is provides the temperature in Celsius since the call to the API is specifically asking form metric
var linkApi = "https://api.openweathermap.org/data/2.5/weather?lat=" + lat + "&lon=" + long + "&units=metric" + "&APPID=" + API_KEY; fetch(linkApi)
If you want it in Fahrenheit simple replace units=metric with units=imperial as described in the API documentation
I actually use only Fitbit Studio and have no problem.
Best Answer