Skip to content
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

Adjusts maxNumberOfDays depending on the endpoint #2066

Merged
merged 4 commits into from
Jul 3, 2020

Conversation

oemel09
Copy link
Contributor

@oemel09 oemel09 commented Jul 2, 2020

Fixes #2018

Now the cnt is set depending on the endpoint

  • for 'forecast/daily' the maxNumberOfDays is used directly
  • for 'forcast' maxNumberOfDay is adjusted. The maximum here is 5 days

The documentation for this module need to be adjusted as well:
https://docs.magicmirror.builders/modules/weatherforecast.html#configuration-options

If a free API token is used this description fits the maxNumberOfDays config:
Possible values: 1 - 5
Default value: 5 (5 days)

Else the config description remains the same

@oemel09
Copy link
Contributor Author

oemel09 commented Jul 2, 2020

Which to use, floor or ceil, may even depend on how the API works exactly...
Not sure if that check is needed anyway, but what I'm trying to do is to only get a full day from the API.
Because once you get the forecast till noon, it could still be cooler in the evening on that day, so the forecast would display some wrong minimal temperature for that day, because it doesn't have the data for the evening yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants