-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[weather] add humidity to hourly view, fix spacing error when using UV Index, add config option to hide precipitation entries that are zero #3526
Changes from 11 commits
35b7d1d
8e9a814
4cf4a55
be1c6fb
5ae048a
209ab59
56b7ed5
1a1cd2d
ebdb680
670dda9
e508516
7987fd8
5939180
f5e4d1e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
{% if config.fade %}style="opacity: {{ currentStep | opacity(numSteps) }};"{% endif %}> | ||
<td class="day">{{ hour.date | formatTime }}</td> | ||
<td class="bright weather-icon"> | ||
<span class="wi weathericon wi-{{ hour.weatherType }}"></span> | ||
<i class="wi weathericon wi-{{ hour.weatherType }}"></i> | ||
OWL4C marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</td> | ||
<td class="align-right bright"> | ||
{{ hour.temperature | roundValue | unit("temperature") }} | ||
|
@@ -21,15 +21,25 @@ | |
{% endif %} | ||
</td> | ||
{% endif %} | ||
{% if config.showHumidity %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please add the new config options to the defaults object at the top of the file There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you mean the defaults in the weather.js? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, it is a new config property, so it needs to havea default value set, and the defaults:{} object contains those There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no progress here, @rejas is the missing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. besides that i had one question above... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. showHumidity is a string due to current.njk implementing multiple options. I only ever implemented a binary True/False. Since js' Boolean("none") == True this will not work as intended without changes. (For that matter all strings that aren't empty are true, so it will always have to check against strings) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed the if to check against "none", but other than that it is still undefined what the correct string should be to turn it on, since the current.njk Humidity has multiple placements, which is inapplicable here. Since the current config comment isn't listing possible values right now, i would suggest changing it to something along the lines of |
||
<td class="align-left bright humidity-hourly"> | ||
{{ hour.humidity }} | ||
<i class="wi wi-humidity humidity-icon"></i> | ||
</td> | ||
{% endif %} | ||
{% if config.showPrecipitationAmount %} | ||
<td class="align-right bright precipitation-amount"> | ||
{{ hour.precipitationAmount | unit("precip", hour.precipitationUnits) }} | ||
</td> | ||
{% if (!config.hideZeroes or hour.precipitationAmount>0) %} | ||
<td class="align-right bright precipitation-amount"> | ||
{{ hour.precipitationAmount | unit("precip", hour.precipitationUnits) }} | ||
</td> | ||
{% endif %} | ||
{% endif %} | ||
{% if config.showPrecipitationProbability %} | ||
{% if (!config.hideZeroes or hour.precipitationAmount>0) %} | ||
<td class="align-right bright precipitation-prob"> | ||
{{ hour.precipitationProbability | unit('precip', '%') }} | ||
{{ hour.precipitationProbability | unit('precip', '%') }} | ||
</td> | ||
{% endif %} | ||
{% endif %} | ||
</tr> | ||
{% set currentStep = currentStep + 1 %} | ||
|
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.
you'll need to move your changelog entries into the latest develop section....
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.
Hopefully this worked? I replaced the entire file with the current one and then added back the changes
EDIT: nevermind.