Skip to content

Commit c52324d

Browse files
committed
Re-did commits from PR MagicMirrorOrg#3526 but against clean branch. (Added Humidity to hourly. Fixed spacing for hourly UV. Added option to hide zeroes in hourly precipitation. Added config option documentation to defaults)
1 parent 68ec696 commit c52324d

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ planned for 2025-04-01
2020
- Mark option `secondsColor` as deprecated in clock module.
2121
- Add Greek translation to Alerts module.
2222
- [newsfeed] Add specific ignoreOlderThan value (override) per feed (#3360)
23+
- [weather] Added option Humidity to hourly View
24+
- [weather] Added option to hide hourly entries that are Zero, hiding the entire column if empty.
2325

2426
### Changed
2527

@@ -49,6 +51,7 @@ planned for 2025-04-01
4951
- [calendar] Fix NewYork event processed on system in Central timezone shows wrong time #3701
5052
- [weather/yr] The Yr weather provider is now able to recover from bad API responses instead of freezing (#3296)
5153
- [compliments] Fix evening events being shown during the day (#3727)
54+
- [weather] Fixed minor spacing issues when using UV Index in Hourly
5255

5356
## [2.30.0] - 2025-01-01
5457

modules/default/weather/hourly.njk

+14-4
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,25 @@
2121
{% endif %}
2222
</td>
2323
{% endif %}
24+
{% if config.showHumidity != "none" %}
25+
<td class="align-left bright humidity-hourly">
26+
{{ hour.humidity }}
27+
<span class="wi wi-humidity humidity-icon"></span>
28+
</td>
29+
{% endif %}
2430
{% if config.showPrecipitationAmount %}
25-
<td class="align-right bright precipitation-amount">
26-
{{ hour.precipitationAmount | unit("precip", hour.precipitationUnits) }}
27-
</td>
31+
{% if (!config.hideZeroes or hour.precipitationAmount>0) %}
32+
<td class="align-right bright precipitation-amount">
33+
{{ hour.precipitationAmount | unit("precip", hour.precipitationUnits) }}
34+
</td>
35+
{% endif %}
2836
{% endif %}
2937
{% if config.showPrecipitationProbability %}
38+
{% if (!config.hideZeroes or hour.precipitationAmount>0) %}
3039
<td class="align-right bright precipitation-prob">
31-
{{ hour.precipitationProbability | unit('precip', '%') }}
40+
{{ hour.precipitationProbability | unit('precip', '%') }}
3241
</td>
42+
{% endif %}
3343
{% endif %}
3444
</tr>
3545
{% set currentStep = currentStep + 1 %}

modules/default/weather/weather.css

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
.weather .precipitation-amount,
3333
.weather .precipitation-prob,
34+
.weather .humidity-hourly,
3435
.weather .uv-index {
3536
padding-left: 20px;
3637
padding-right: 0;

modules/default/weather/weather.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ Module.register("weather", {
1414
updateInterval: 10 * 60 * 1000, // every 10 minutes
1515
animationSpeed: 1000,
1616
showFeelsLike: true,
17-
showHumidity: "none", // this is now a string; see current.njk
17+
showHumidity: "none", // for current possible options are "none", "wind", "temp", "feelslike" or "below", for hourly "none" or "true"
18+
hideZeroes: false, // hide zeroes (and empty columns) in hourly, currently only for precipitation
1819
showIndoorHumidity: false,
1920
showIndoorTemperature: false,
2021
allowOverrideNotification: false,

0 commit comments

Comments
 (0)