01-14-2022 16:46 - edited 01-14-2022 17:48
01-14-2022 16:46 - edited 01-14-2022 17:48
I see several successful implementations of the weather API with SDK 4.3. However, all my attempts to use the API result in: "TypeError: Attempted to assign to readonly property."
When I used the CLI instead I get "[error][app] weather is imported by app/index.js, but could not be resolved".
The code I'm using is very barebones:
weather
.getWeatherData()
.then((data) => {
console.log("weather ok");
})
.catch((ex) => {
console.error(ex);
});
01-18-2022 13:22
01-18-2022 13:22
I suggest referencing this project: https://github.com/Fitbit/sdk-weather-clock
02-17-2022 04:16
02-17-2022 04:16
You must put the weather Request into companion. You can use the Messaging API to send the Weather Data to your watch