forked from SeitaBV/flexmeasures-openweathermap
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
We actually are mapping OWMs response fields to FlexMeasures' internal names and sensor representation. A crucial part of code in this plugin.
I found out that when calling WeatherAPI, we are first translating its responses into the OWM format (in map_weather_api_to_owm()) and then let the usual mapping code run.
We should actually make them independent of each other (imagine OWM changes its format, then your WeatherAPI code breaks also). Two mappings in sensor_specs.py, and then save_forecasts_in_db() only selects the right one. Much cleaner.
(Something I should have caught in an earlier review, sorry)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels