MMM-Netatmo
MMM-Netatmo copied to clipboard
display measurements with respect to the users unit settings
see #23
Christopher, in the discussion of issue #23, you mentioned that your understanding of the Weather API was that the data was being sent in the correct units. I believe the documentation provided in the introduction to the API contradicts that.
From the technical data provided in the introduction to the Weather Station API, it seems Netatmo is providing weather data in the following format:
Netatmo users are provided with the following regional preference setting options from their browser (the settings are similar in the iOS/android apps):
The 'user' parameter within the API gives the necessary data to correct the returned data within the application:
I am very new to coding (esp. in Javascript) so please forgive any errors in syntax I may make. Is it feasible to build three arguments to implement these 'unit', 'windunit' and 'pressureunit' parameters in the "formatter" function?
linked to #148
We already get this from the station data API call:
So the issue is NetAtmo's API always returns the measurement values in a specific set of units... but it also provides user units preferences so it can be converted afterwards, right?
It's indeed a weird implementation... but couldn't the preferences be fetched and stored when initiating the module, then simply convert the fetched measurement values, and display the proper units, based on that? Or something like that? Is there any other part of information missing?