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

[weather] add humidity to hourly view, fix spacing error when using UV Index, add config option to hide precipitation entries that are zero [Rebased Version of PR #3526] #3748

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

OWL4C
Copy link
Contributor

@OWL4C OWL4C commented Mar 20, 2025

Fixed Version of PR #3526 since that was against the wrong branch and had issues.

Original PR Text:
Basically the title. Just some existing weather data included into hourly, some config option ("hideZeroes") to hide precipitation when it is zero (this actually shrinks the entire table, removing columns that are completely empty), and add a spacing column to fix the UV Index column.

…(Added Humidity to hourly. Fixed spacing for hourly UV. Added option to hide zeroes in hourly precipitation. Added config option documentation to defaults)
@@ -14,7 +14,8 @@ Module.register("weather", {
updateInterval: 10 * 60 * 1000, // every 10 minutes
animationSpeed: 1000,
showFeelsLike: true,
showHumidity: "none", // this is now a string; see current.njk
showHumidity: "none", // for current possible options are "none", "wind", "temp", "feelslike" or "below", for hourly "none" or "true"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
showHumidity: "none", // for current possible options are "none", "wind", "temp", "feelslike" or "below", for hourly "none" or "true"
showHumidity: "none", // possible options for "current" weather are "none", "wind", "temp", "feelslike" or "below", for "hourly" weather "none" or "true"

@khassel
Copy link
Collaborator

khassel commented Mar 21, 2025

don't know why but all hourly e2e-weather tests are failing with these changes ...

@sdetweil
Copy link
Collaborator

i havent checked the html elements

but test cases get it from
tr:nth-child(${index + 1}) td.precipitation-prob`

Copy link
Collaborator

@khassel khassel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reason for the failing tests are the !, they must be replaced by not.

<td class="align-right bright precipitation-amount">
{{ hour.precipitationAmount | unit("precip", hour.precipitationUnits) }}
</td>
{% if (!config.hideZeroes or hour.precipitationAmount>0) %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

              {% if (not config.hideZeroes or hour.precipitationAmount>0) %}

{% endif %}
{% if config.showPrecipitationProbability %}
{% if (!config.hideZeroes or hour.precipitationAmount>0) %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

              {% if (not config.hideZeroes or hour.precipitationAmount>0) %}

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.

None yet

4 participants