Skip to content

Commit

Permalink
Changed condition of display for obs in stat tiles/conditionas table. G…
Browse files Browse the repository at this point in the history
  • Loading branch information
Daveiano committed Oct 24, 2023
1 parent ecac86d commit 717eed4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,7 @@ See https://github.com/Daveiano/weewx-wdc/compare/v3.2.0...11eed6b3#diff-ba225fb
- Bugfix: Division by zero in get_windrose_data GH-192
- Bugfix: Manifest.json does not use base_path GH-197
- Bugfix: Tool Tip out of Scope GH-194
- Bugfix: Observations with $current N/A values are not shown anymore in stat-tiles/conditions table on day page GH-188
- Added `show_min_max` configuration to gauges config, added ordinal display for windDir gauge min/max
- Only show 3 decimals for the geocode provided by weewx-forecast GH-191
- Make sidebar scrollable (if there are too many items) GH-193
10 changes: 9 additions & 1 deletion skins/weewx-wdc/includes/body-alternative.inc
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,23 @@ $render_gauges($DisplayOptions['Gauges'][$context])

<div class="bx--row">
<!--prettier-ignore-->
$to_bool($DisplayOptions.get('show_min_max_time_day', False)))
#for $skin_obs in $DisplayOptions.get('stat_tile_observations')
#if $skin_obs != 'windDir' and $skin_obs != 'windGustDir' and $skin_obs != 'rainRate'
#set $skin_obs_binding = $get_data_binding($skin_obs)

#set $show_sum = $get_show_sum($skin_obs)
#set $show_min = $get_show_min($skin_obs)
#set $show_max = $get_show_max($skin_obs)
#set $use_day = $show_sum or $show_min or $show_max

## I dont know why but $alltime($data_binding=$skin_obs_binding) crashes on the month-%Y-%m and year-%Y pages:
## ValueError: start time (1654034700) is greater than stop time (1640991600)
#set $alltime_tag = $alltime($data_binding=$skin_obs_binding) if $context == 'alltime' else None

#if $context == 'day' and not $daily_archive
#if $context == 'day' and not $daily_archive and $use_day
#set $stat_tile_check = $day
#elif $context == 'day' and not $daily_archive and not $use_day
#set $stat_tile_check = $current
#else
#set $stat_tile_check = $get_time_span_from_context($context, $day($data_binding=$skin_obs_binding), $week($data_binding=$skin_obs_binding), $month($data_binding=$skin_obs_binding), $year($data_binding=$skin_obs_binding), $alltime_tag, $yesterday($data_binding=$skin_obs_binding))
Expand Down
11 changes: 9 additions & 2 deletions skins/weewx-wdc/includes/conditions-table.inc
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,17 @@

#set $context_binded = $get_time_span_from_context($context, $day($data_binding=$skin_obs_binding), $week($data_binding=$skin_obs_binding), $month($data_binding=$skin_obs_binding), $year($data_binding=$skin_obs_binding), $alltime_tag, $yesterday($data_binding=$skin_obs_binding))

#if $context == 'day' and not $daily_archive
#set $show_sum = $get_show_sum($skin_obs)
#set $show_min = $get_show_min($skin_obs)
#set $show_max = $get_show_max($skin_obs)
#set $use_day = $show_sum or $show_min or $show_max

#if $context == 'day' and not $daily_archive and $use_day
#set $context_binding = $day
#elif $context == 'day' and not $daily_archive and not $use_day
#set $context_binding = $current
#else
#set $context_binding = context_binded
#set $context_binding = $context_binded
#end if

#if $getattr($context_binding, $skin_obs_key).has_data and not $get_show_sum($skin_obs) and $skin_obs != 'windDir' and $skin_obs != 'windGustDir'
Expand Down

0 comments on commit 717eed4

Please sign in to comment.