17 Commits

Author SHA1 Message Date
Veeck
2d3940a4ff
Use metric units internally in all weatherproviders (#2849)
So finally I think this refactorin is ready to be reviewed :-)

DONE:
- [x] Removed all conversion functions for wind and temperature from
specific weatherproviders
- [x] Use internally only metric units: celsius for temperature, meters
per seconds for wind
- [x] Convert temp and wind into the configured units when displaying
data on the UI
- [x] look how beaufort calculation uses metrics, added knots as new
windunit
- [x] add more e2e tests 

Checked providers:
- [x] Darksky
- [x] EnvCanada
- [x] OpenWeatherMap
- [x] SMHI provider 
- [x] UK Met Office
- [x] UK Met Office DataHub
- [x] WeatherBit
- [x] WeatherFlow
- [x] WeatherGov

TODO in different tickets:
- check weatherproviders for usage of weatherEndpoint (as seen in
https://github.com/MichMich/MagicMirror-Documentation/issues/131) -> see
#2926
- cleanup precipations -> #2953

Co-authored-by: veeck <michael@veeck.de>
2022-10-24 19:41:34 +02:00
Veeck
d5e855dd6d
Use fetch instead of XMLHttpRequest in weatherprovider (#2935)
small update to the fetchData method to use the fetch helper instead of
the old XCMLHttpRequest.
Also fixes some typos :-)

Co-authored-by: veeck <michael@veeck.de>
2022-10-06 19:44:16 +02:00
Kristjan SCHMIDT
a5668b1b99 Magic Mirror -> MagicMirror²
Consistent spelling
2022-01-26 23:09:26 +01:00
rejas
221b6325f6 Cleanup some docs in the weather modules 2021-09-04 13:50:21 +02:00
veeck
a7756cec13 Inline some functions 2021-09-02 20:37:41 +02:00
veeck
a273266e5e Remove useless returns and now unused jsdoc variables 2021-09-02 20:35:25 +02:00
rejas
c132206543 Use new method in ukmetofficedatahub provider 2021-09-01 20:02:45 +02:00
veeck
bcff953fbb Fix warning in weather provider 2021-07-14 10:41:29 +02:00
veeck
bcc0cc599d Fix == usages 2021-07-14 10:41:29 +02:00
veeck
10c47a6c38 Really run prettier 2021-04-12 19:33:23 +02:00
Gerardo Gonzalez
331d147d50
Update ukmetofficedatahub.js
There is a wrong treatment to appendLocationNameToHeader.
The location should be always returned and leave the weater.js to decide if is included or not in the header.
2021-04-10 01:20:52 +01:00
buxxi
41508931be Moving default values regarding specific providers into the providers themselves 2021-01-23 11:21:56 +01:00
Michael Teeuw
e950cdaf32 Prettier fixes. 2020-12-08 16:20:48 +01:00
Aurélien Veillard
1460f002ab Add new parameter "useKmh" to weather module
Add new parameter "useKmh" to weather module for displaying wind speed as km/h instead of m/s when windUnits is set to metric.
2020-11-08 14:01:02 +01:00
veeck
078438442a Cleanup some log levels 2020-11-06 11:47:29 +01:00
CreepinJesus
b91fccc0e3 Update metofficedatahub.js 2020-06-28 12:09:16 +01:00
CreepinJesus
dd32d3a492
New Met Office provider
This is a provider for the Met Office's new DataHub API (which will eventually replace their current DataPoint service).
2020-06-28 10:57:19 +01:00