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
Add (optional) precipitation amount #184
Conversation
Adds an option to display precipitation amounts.
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.
Thanks -- some comments below
@@ -339,6 +344,22 @@ export class HourlyWeatherCard extends LitElement { | |||
return temperatures; | |||
} | |||
|
|||
private getPrecipitation(forecast: ForecastSegment[], numSegments: number, offset: number, unit: string): SegmentPrecipitation[] { |
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 can stay as-is since it'll be easy to add precipitation probability into the objects later.
Allows for a future PR to add the chance of precipitation without renaming this option. Co-authored-by: Jonathan Keslin <decompil3d@users.noreply.github.com>
Sure, that makes sense to me. Thanks for the suggested changes; that saved me some time finding all the places that needed changing (though you did miss one, which I've sorted in a subsequent commit). |
Adds an option to display precipitation amounts.
I noticed that there's a feature request for precipitation amounts, so I've implemented it following the same patterns as in #182 (wind forecast).
Closes #142