Rain days from current year on homepage of Berlchertown skin

53 views
Skip to first unread message

Matthias Manhart

unread,
Sep 3, 2023, 3:48:36 PM9/3/23
to weewx-user
The original file "\skins\Belchertown\index.html.tmpl" shows the max/min values of the current month:

  <!-- This Month Snapshot Stats -->
  <div class="col-sm-6 stn-quick-stats border-left">
      <div class="stats-title">
          <span class="snapshot-records-month-header"></span><!-- JS and AJAX -->
      </div>
      <table>
          <tr>
              <td><b>$obs.label.snapshot_high:</b></td>    <td><span class="monthstatshigh">$month.outTemp.max</span></td><!-- AJAX -->
              <td><b>$obs.label.snapshot_low:</b></td>    <td><span class="monthstatslow">$month.outTemp.min</span></td><!-- AJAX -->
          </tr>
          <tr>
              <td><b>$obs.label.snapshot_month_avg_wind:</b></td>    <td><span class="monthstatswindavg">$month.wind.avg</span></td><!-- AJAX -->
              <td><b>$obs.label.snapshot_month_high_wind:</b></td>        <td><span class="monthstatswindmax">$month.wind.max</span></td><!-- AJAX -->
          </tr>
          <tr>
              <td><b>$obs.label.snapshot_month_rain:</b></td>        <td><span class="monthstatsrain">$month.rain.sum</span></td><!-- AJAX -->
              <td><b>$obs.label.snapshot_month_rainrate:</b></td>    <td><span class="monthstatsrainrate">$month.rainRate.max</span></td><!-- AJAX -->
          </tr>
      </table>
  </div>


I modified this section to show the max/min values of the current year:

  <!-- This Year Snapshot Stats -->
  <div class="col-sm-6 stn-quick-stats border-left">
      <div class="stats-title">
          <span class="snapshot-records-year-header"></span><!-- JS and AJAX -->
      </div>
      <table>
          <tr>
              <td>$obs.label.snapshot_low:</td>    <td><span class="yearstatslow">$year.outTemp.min</span></td><!-- AJAX -->
              <td>$obs.label.snapshot_high:</td>    <td><span class="yearstatshigh">$year.outTemp.max</span></td><!-- AJAX -->
          </tr>
          <tr>
              <td>$obs.label.snapshot_month_avg_wind:</td>    <td><span class="yearstatswindavg">$year.wind.avg</span></td><!-- AJAX -->
              <td>$obs.label.snapshot_month_high_wind:</td>        <td><span class="yearstatswindmax">$year.wind.max</span></td><!-- AJAX -->
          </tr>
          <tr>
              <td>$obs.label.snapshot_month_rain:</td>        <td><span class="yearstatsrain">$year.rain.sum</span></td><!-- AJAX -->
              <td>$obs.label.snapshot_month_rainrate:</td>    <td><span class="yearstatsrainrate">$year.rainRate.max</span></td><!-- AJAX -->
          </tr>
          <tr>
              <td>$obs.label.snapshot_baro_low:</td>    <td><span class="yearstatsblow">$year.barometer.min</span></td><!-- AJAX -->
              <td>$obs.label.snapshot_baro_high:</td>    <td><span class="yearstatsbhigh">$year.barometer.max</span></td><!-- AJAX -->
          </tr>
      </table>
  </div>


I would like to show the number of rain days of the current year instead of the max rain rate. How can i show this value ?

Regards

Matthias

Tom Keffer

unread,
Sep 3, 2023, 8:02:56 PM9/3/23
to weewx...@googlegroups.com
To show the number of days with more than 1mm of rain so far this year:

$year.rain.sum_ge((1, "mm"))



--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/a16ae8b7-5a8d-4636-9067-5902efb5ccfbn%40googlegroups.com.

Matthias Manhart

unread,
Sep 4, 2023, 5:11:19 AM9/4/23
to weewx-user
Thanks for your support.
Reply all
Reply to author
Forward
0 new messages