Skip to content

Commit

Permalink
weather: add showHumidityWithTemp option
Browse files Browse the repository at this point in the history
This shows the humidity alongside the temperature, making for a more
compact display.
  • Loading branch information
crazyscot committed Jan 2, 2024
1 parent 5f7b56e commit 96a27c7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ _This release is scheduled to be released on 2024-04-01._

### Added

- Added `showHumidityWithTemp` option to the weather module.

### Updated

### Fixed
Expand Down
5 changes: 4 additions & 1 deletion modules/default/weather/current.njk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</sup>
{% endif %}
</span>
{% if config.showHumidity and current.humidity %}
{% if config.showHumidity and current.humidity and not config.showHumidityWithTemp %}
<span>{{ current.humidity | decimalSymbol }}</span><sup>&nbsp;<i class="wi wi-humidity humidity-icon"></i></sup>
{% endif %}
{% if config.showSun %}
Expand All @@ -40,6 +40,9 @@
<div class="large light">
<span class="wi weathericon wi-{{ current.weatherType }}"></span>
<span class="bright">{{ current.temperature | roundValue | unit("temperature") | decimalSymbol }}</span>
{% if config.showHumidity and current.humidity and config.showHumidityWithTemp %}
<span class="medium"><span>{{ current.humidity | decimalSymbol }}</span><sup>&nbsp;<i class="wi wi-humidity humidity-icon"></i></sup></span>
{% endif %}
</div>
<div class="normal light indoor">
{% if config.showIndoorTemperature and indoor.temperature %}
Expand Down
1 change: 1 addition & 0 deletions modules/default/weather/weather.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Module.register("weather", {
animationSpeed: 1000,
showFeelsLike: true,
showHumidity: false,
showHumidityWithTemp: false,
showIndoorHumidity: false,
showIndoorTemperature: false,
allowOverrideNotification: false,
Expand Down

0 comments on commit 96a27c7

Please sign in to comment.