-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forecasts limited to registered sensors #13
Forecasts limited to registered sensors #13
Conversation
* change owm version to 3 and add version checker * rais a warning * try black only * make API_VERSION a module constant and add tested versions to the warning Signed-off-by: Nicolas Höning <nicolas@seita.nl> --------- Signed-off-by: Nicolas Höning <nicolas@seita.nl> Co-authored-by: Nicolas Höning <nicolas@seita.nl>
…ich-are-present' into 11-save-data-for-those-sensor-which-are-present
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a little mit more tricky than I had thought, but we're getting closer :)
I even made two new tickets while thinking about this PR.
Here is one other comment I have - an different improvement I saw while looking at the code:
The line owm.py:107 (data_source = get_or_create_owm_data_source()
) can move one upwards, outside of the for-loop (we use the same data source for all sensors).
Previously, our focus was on
mapping
all the available sensors, but this approach restricted us to obtaining forecasts for just one or two sensors. In this pull request (PR), I've implemented a sensor check. This means that if a sensor is not registered, it will be disregarded during the forecasting process.