Skip to content

Adapting the Seasons skin to display a new field

gary edited this page Sep 2, 2023 · 20 revisions

Adapting the Seasons skin to display additional GW1000 sensor data

Note: The following instructions apply only to the Seasons skin included in WeeWX v4.6.3 and earlier. The Seasons skin included in WeeWX v4.7.0 and later uses an automated configuration of the skin. Users using the Seasons skin from WeeWX v4.7.0 or later should refer to the [DisplayOptions] stanza in the Seasons skin config file skin.conf.

The Seasons skin shipped with WeeWX will display data for a range of common WeeWX fields, for example outTemp, rain and barometer as well as a small number of less common WeeWX fields such as radiation, UV and extraTemp1. The GW1000 has the ability to support a rich suite of sensors that provide data that is readily processed and stored by WeeWX but which is not directly supported by the Seasons skin. Some modification of the Seasons skin is required in order to display these additional fields provided by the GW1000.

Seasons skin structure

Adapting the Seasons skin to display additional WeeWX fields is more complex than with the previous Standard skin due in part to the modular nature of the Seasons skin compared to the monolithic structure of the Standard skin. The Seasons skin consists of a main page as well as a number of supporting pages with the main page itself consisting of a number of panels. The content of these pages and panels is generated through a number of Cheetah templates as follows:

Page or panel Template file
Main or Current Conditions page index.html.tmpl
Current Conditions panel current.inc
Celestial panel celestial.inc
High/Low panel hilo.inc
Sensor Status panel sensors.inc
About panel about.inc
History panel history.inc
Celestial page celestial.html.tmpl
Statistics page statistics.html.tmpl
Sensor Status page telemetry.html.tmpl

In most cass when adding a new observation to the Seasons skin a user will want to add the observation to one or more or all of the following pages/panels:

  • Current Conditions panel
  • High/Low panel
  • History panel
  • Statistics page

The following sections detail the how to add an observation to the above pages and panels.

Note: Depending on the observation/sensor the user may also wish to add details to the Sensor Status page and Sensor Status panel in which case you should refer to the Adapting the Seasons skin to display battery states page.

To add a new observation to the Current Conditions panel

Note: Depending on your system configuration some or all of the following commands may need to be prefixed with sudo or otherwise executed by a user account with privileged system access.

  1. Make a copy of the existing skins/Seasons/current.inc so it is possible to easily revert to a working configuration if a mistake is made. For setup.py installs:

    $ cp /home/weewx/skins/Seasons/current.inc /home/weewx/skins/Seasons/current_orig.inc
    

    or for package installs:

    $ cp /etc/weewx/skins/Seasons/current.inc /etc/weewx/skins/Seasons/current_orig.inc
    
  2. Edit skins/Seasons/current.inc. If you look at the structure of the file from around line 14 onwards you will notice a repeated series of HTML like code, for example:

        <tr>
            <td class="label">$obs.label.rainRate</td>
            <td class="data">$current.rainRate</td>
        </tr>
        <tr>
            <td class="label">$obs.label.rain_today</td>
            <td class="data">$day.rain.sum</td>
        </tr>
    #if $day.UV.has_data
        <tr>
            <td class="label">$obs.label.UV</td>
            <td class="data">$current.UV</td>
        </tr>
    #end if
    

    This particular extract shows the code to display three observations; the current rain rate, today's rainfall and the current UV index. Each observation utilises a row in a HTML table (the <tr></tr> tags) and each row consists of two field (the two pairs of <td></td> tags). The <td></td> tags with class='label' display the label for the observation and the <td></td> tags with class='data' display the observational data. In both cases a WeeWX report tag is used to display the relevant label and data. The #if..#end if statement is used to display the UV data only if UV data for today exists, in other words only if UV data exists within the WeeWX database. This way stations that don't provide UV data will not display a label and empty placeholder for UV data in the panel.

  3. Locate where in the list of current observations (ie the <tr></tr> tag pairs) you wish the new observation to appear and then insert the appropriate <tr></tr>/<td></td> lines and WeeWX report tags. For example, to display the current soilMoist1 value immediately after today's rainfall you might use the following:

        <tr>
            <td class="label">$obs.label.rain_today</td>
            <td class="data">$day.rain.sum</td>
        </tr>
        <tr>
            <td class="label">$obs.label.soilMoist1</td>
            <td class="data">$current.soilMoist1</td>
        </tr>
    #if $day.UV.has_data
        <tr>
            <td class="label">$obs.label.UV</td>
            <td class="data">$current.UV</td>
        </tr>
    #end if
    

    If you were providing this template for use by others who might not have soilMoist1 you might place an #if..#end if statement around your new lines as follows:

        <tr>
            <td class="label">$obs.label.rain_today</td>
            <td class="data">$day.rain.sum</td>
        </tr>
    #if $day.soilMoist1.has_data
        <tr>
            <td class="label">$obs.label.soilMoist1</td>
            <td class="data">$current.soilMoist1</td>
        </tr>
    #end if
    #if $day.UV.has_data
        <tr>
            <td class="label">$obs.label.UV</td>
            <td class="data">$current.UV</td>
        </tr>
    #end if
    

    This way users that do not have a soil moisture sensor will not see a soil moisture label and placeholder on their Seasons page.

    The WeeWX report tag $current.soilMoist1 will display the current soilMoist1 value formatted with a unit label as per the relevant format and unit label specifiers in skin.conf or weewx.conf. The tag $obs.label.soilMoist1 displays the label for soilMoist1 from the corresponding entry from [Labels] [[Generic]] is skin.conf or as overridden in weewx.conf. If you wish to label the soilMoist1 field as Front Garden you might include an entry such as the following in the skins/Seasons/skin.conf:

    [Labels]
        [[Generic]]
            ....
            soilMoist1 = Front Garden
    

    Note: You could also place these entries in weewx.conf under [StdReport] [[SeasonsReport]] [[Labels]]] [[[[Generic]]]]. The choice is up to the user, arguably weewx.conf is WeeWX upgrade safe but it is highly unlikely that a WeeWX upgrade will make destructive changes to the skins/Seasons/skin.conf.

  4. Save skins/Seasons/current.inc and the next report cycle should see the soilMoist1 data appear in the Current Conditions panel provided you have soilMoist1 in your archive. Note you may have to refresh the page for the updated data to be displayed.

    Note: Any problems or errors in the modified current.inc should not cause WeeWX to exit; however, it may cause WeeWX to fail to generate the Seasons skin main page. In such cases check the WeeWX log for log entries that may indicate the source of the problem. If the problem cannot be immediately fixed you can revert to the original current.inc by deleting the modified current.inc and re-instating the original current.inc. For setup.py installs:

     $ rm /home/weewx/skins/Seasons/current.inc
     $ mv /home/weewx/skins/Seasons/current_orig.inc /home/weewx/skins/Seasons/current.inc
    

    or for package installs:

     $ rm /etc/weewx/skins/Seasons/current.inc
     $ mv /etc/weewx/skins/Seasons/current_orig.inc /etc/weewx/skins/Seasons/current.inc
    

To add a new observation to the High/Low panel

Note: Depending on your system configuration some or all of the following commands may need to be prefixed with sudo or otherwise executed by a user account with privileged system access.

  1. Make a copy of the existing skins/Seasons/hilo.inc so it is possible to easily revert to a working configuration if a mistake is made. For setup.py installs:

    $ cp /home/weewx/skins/Seasons/hilo.inc /home/weewx/skins/Seasons/hilo_orig.inc
    

    or for package installs:

    $ cp /etc/weewx/skins/Seasons/hilo.inc /etc/weewx/skins/Seasons/hilo_orig.inc
    
  2. Edit skins/Seasons/hilo.inc. If you look at the structure of the file from around line 17 onwards you will notice a HTML <table></table> block. The template constructs a HTML table containing columns for today and each other aggregate period used (eg week, month etc) and rows for each observation. Some Javascript is used within the main or Current Conditions page to display only the relevant High/Low columns as different aggregate periods are selected in the History panel. Within the <table></table> block you will notice a repeated series of HTML like code between <tr></tr> HTML tags, for example:

        <tr>
            <td></td>
            <th>&nbsp;<br/>Today</th>
            <th class="hilo_week">&nbsp;<br/>Week</th>
            <th class="hilo_month">&nbsp;<br/>Month</th>
            <th class="hilo_year">
                <a onclick="toggle_rainyear()">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>Year</a>
            </th>
            <th class="hilo_rainyear">
                <a onclick="toggle_rainyear()">Rain<br/>Year</a>
            </th>
            <td></td>
        </tr>
        <tr>
            <td class="label">$obs.label.outTemp</td>
            #for $archive in $archive_data
            <td class="data new_row hilo_$archive[0]">
                <span title="$archive[1].outTemp.maxtime">
                    $archive[1].outTemp.max.format(add_label=False)</span><br/>
               <span title="$archive[1].outTemp.mintime">
                    $archive[1].outTemp.min.format(add_label=False)</span>
            </td>
            #end for
            <td class="units">$unit.label.outTemp</td>
        </tr>
        <tr>
            <td class="label">$obs.label.heatindex</td>
            #for $archive in $archive_data
            <td class="data new_row hilo_$archive[0]">
                <span title="$archive[1].heatindex.maxtime" class="hival">
                    $archive[1].heatindex.max.format(add_label=False)</span>
            </td>
            #end for
            <td class="units">$unit.label.heatindex</td>
        </tr>
    

    This particular extract shows three <tr></tr> blocks that display column headings, the outTemp max/min row and the heatindex max row. Each observation utilises a row in a HTML table (the <tr></tr> tags) though some rows such as outTemp display two sub-rows of data, max and min. Each row consists of three fields defined by the three pairs of <td></td> tags. The <td></td> tags with class='label' display the label for the observation. The <td></td> tags with class='data' display the aggregate value and the <td></td> tags with class='units' display the units for the observation. A WeeWX report tag is used to display the relevant label and units. The #for..#end for block is used to iterate over the aggregate periods displayed in the table and appropriate WeeWX report tags are used to display the applicable aggregate value.

  3. Locate where in the list of observations you wish the new observation to appear and then insert the appropriate <tr></tr>/<td></td> lines and WeeWX report tags. For example, and following on from the Current Conditions panel example above, to display the soilMoist1 high/low values immediately after heatindex you might use the following:

        <tr>
            <td class="label">$obs.label.heatindex</td>
            #for $archive in $archive_data
            <td class="data new_row hilo_$archive[0]">
                <span title="$archive[1].heatindex.maxtime" class="hival">
                    $archive[1].heatindex.max.format(add_label=False)</span>
            </td>
            #end for
            <td class="units">$unit.label.heatindex</td>
        </tr>
        <tr>
            <td class="label">$obs.label.soilMoist1</td>
            #for $archive in $archive_data
            <td class="data new_row hilo_$archive[0]">
                <span title="$archive[1].soilMoist1.maxtime">
                    $archive[1].soilMoist1.max.format(add_label=False)</span><br/>
                <span title="$archive[1].soilMoist1.mintime">
                    $archive[1].soilMoist1.min.format(add_label=False)</span>
            </td>
            #end for
            <td class="units">$unit.label.soilMoist1</td>
        </tr>
    

    If you wanted to display just the soilMoist1 high value you might use the following:

        <tr>
            <td class="label">$obs.label.heatindex</td>
            #for $archive in $archive_data
            <td class="data new_row hilo_$archive[0]">
                <span title="$archive[1].heatindex.maxtime" class="hival">
                    $archive[1].heatindex.max.format(add_label=False)</span>
            </td>
            #end for
            <td class="units">$unit.label.heatindex</td>
        </tr>
        <tr>
            <td class="label">$obs.label.soilMoist1</td>
            #for $archive in $archive_data
            <td class="data new_row hilo_$archive[0]">
                <span title="$archive[1].soilMoist1.maxtime" class="hival">
                    $archive[1].soilMoist1.max.format(add_label=False)</span>
            </td>
            #end for
            <td class="units">$unit.label.soilMoist1</td>
        </tr>
    

    Again following on from the Current Conditions panel example above if you were providing this template for use by others who might not have soilMoist1 you might place an #if..#end if statement around your new lines as follows:

        <tr>
            <td class="label">$obs.label.heatindex</td>
            #for $archive in $archive_data
            <td class="data new_row hilo_$archive[0]">
                <span title="$archive[1].heatindex.maxtime" class="hival">
                    $archive[1].heatindex.max.format(add_label=False)</span>
            </td>
            #end for
            <td class="units">$unit.label.heatindex</td>
        </tr>
        #if $day.soilMoist1.has_data
        <tr>
            <td class="label">$obs.label.soilMoist1</td>
            #for $archive in $archive_data
            <td class="data new_row hilo_$archive[0]">
                <span title="$archive[1].soilMoist1.maxtime" class="hival">
                    $archive[1].soilMoist1.max.format(add_label=False)</span>
            </td>
            #end for
            <td class="units">$unit.label.soilMoist1</td>
        </tr>
        #end if    
    

    This way users that do not have a soil moisture sensor will not see a soil moisture label and placeholder in the High/Low panel on their Seasons page.

    The WeeWX report tag $xxxxx.soilMoist1.max.format() will display the maximum soilMoist1 value over the period xxxxx formatted with a unit label as per the relevant format and unit label specifiers in skin.conf or weewx.conf. The tag $obs.label.soilMoist1 displays the label for soilMoist1 from the corresponding entry from [Labels] [[Generic]] is skin.conf or as overridden in weewx.conf. If you wish to label the soilMoist1 field as Front Garden you might include an entry such as the following in the skins/Seasons/skin.conf:

    [Labels]
        [[Generic]]
            ....
            soilMoist1 = Front Garden
    

    Note: You could also place these entries in weewx.conf under [StdReport] [[SeasonsReport]] [[Labels]]] [[[[Generic]]]]. The choice is up to the user, arguably weewx.conf is WeeWX upgrade safe but it is highly unlikely that a WeeWX upgrade will make destructive changes to the skins/Seasons/skin.conf.

  4. Save skins/Seasons/hilo.inc and the next report cycle should see the soilMoist1 data appear in the High/Low panel provided you have soilMoist1 in your archive. Note you may have to refresh the page for the updated data to be displayed.

    Note: Any problems or errors in the modified hilo.inc should not cause WeeWX to exit; however, it may cause WeeWX to fail to generate the Seasons skin main page. In such cases check the WeeWX log for log entries that may indicate the source of the problem. If the problem cannot be immediately fixed you can revert to the original hilo.inc by deleting the modified hilo.inc and re-instating the original hilo.inc. For setup.py installs:

     $ rm /home/weewx/skins/Seasons/hilo.inc
     $ mv /home/weewx/skins/Seasons/hilo_orig.inc /home/weewx/skins/Seasons/hilo.inc
    

    or for package installs:

     $ rm /etc/weewx/skins/Seasons/hilo.inc
     $ mv /etc/weewx/skins/Seasons/hilo_orig.inc /etc/weewx/skins/Seasons/hilo.inc
    

To add a new observation to the History panel

Adding a new observation to the History panel is a two step process. First the Seasons skin needs to be configured to generate any extra plots to be displayed in the History panel and second the Seasons skin needs to be modified to display these extra plots in the History panel.

To generate additional plots

Note: Depending on your system configuration some or all of the following commands may need to be prefixed with sudo or otherwise executed by a user account with privileged system access.

  1. Make a copy of the existing skins/Seasons/skin.conf so it is possible to easily revert to a working configuration if a mistake is made. For setup.py installs:

    $ cp /home/weewx/skins/Seasons/hilo.inc /home/weewx/skins/Seasons/skin.conf
    

    or for package installs:

    $ cp /etc/weewx/skins/Seasons/hilo.inc /etc/weewx/skins/Seasons/skin.conf
    
  2. Edit skins/Seasons/skin.conf. Locate the [ImageGenerator] stanza and then locate the [[day_images]] stanza. The [[day_images]] stanza defines all of the 'day' plots generated by the Seasons skin. If you look further down the file you will notice [[week_images]], [[month_images]] and [[year_images]] stanzas that define the Seasons week, month and year plots respectively. If you look back at the [[day_images]] stanza you will notice it looks something like:

    [[day_images]]
        x_label_format = %H:%M
        bottom_label_format = %x %X
        time_length = 97200 # 27 hours
        
        [[[daybarometer]]]
            [[[[barometer]]]]
        
        [[[daytempdew]]]
            [[[[outTemp]]]]
            [[[[dewpoint]]]]
    

    In this case the [[[daybarometer]]] stanza defines a plot that will consist of the WeeWX barometer field only and the plot image file will be named daybarometer.png. Similarly, the [[[daytempdew]]] stanza defines a plot that will consist of WeeWX fields outTemp and dewpoint and the plot image file will be named daytempdew.png.

  3. To generate a new plot that displays the WeeWX field soilMoist1 over the period of a day you might add a [[[daymoist]]] stanza under [[day_images]] as follows:

    [[day_images]]
        x_label_format = %H:%M
        bottom_label_format = %x %X
        time_length = 97200 # 27 hours
        
        [[[daybarometer]]]
            [[[[barometer]]]]
                        
        [[[daymoist]]]
            [[[[soilMoist1]]]]    
    
        [[[daytempdew]]]
            [[[[outTemp]]]]
            [[[[dewpoint]]]]
    

    This would result in the plot image file daymoist.png being generated.

    Note: Further details on use of the WeeWX Image generator to generate plot files can be found in The Image generator section of the Customization Guide.

To display additional plots

Note: Depending on your system configuration some or all of the following commands may need to be prefixed with sudo or otherwise executed by a user account with privileged system access.

  1. Make a copy of the existing skins/Seasons/index.htm.tmpl so it is possible to easily revert to a working configuration if a mistake is made. For setup.py installs:

    $ cp /home/weewx/skins/Seasons/index.html.tmpl /home/weewx/skins/Seasons/index_orig.html.tmpl
    

    or for package installs:

    $ cp /etc/weewx/skins/Seasons/index.html.tmpl /etc/weewx/skins/Seasons/index_orig.html.tmpl
    
  2. Edit skins/Seasons/index.html.tmpl. If you look at the structure of the file from around line 46 onwards you will notice a HTML <div id="history_day"></div> block that contains numerous HTML <img> tags. This block defines the 'day' plot layout and the <img> tags specify the plots to be displayed, for example:

    <div id="history_day" class="plot_container">
        <img src="daybarometer.png" alt="$obs.label.barometer"/>
        <img src="daytempdew.png"   alt="$obs.label.outTemp" />
        <img src="daytempfeel.png"  alt="$obs.label.feel" />
        <img src="dayhum.png"       alt="$obs.label.outHumidity" />
        <img src="daywind.png"      alt="$obs.label.windSpeed" />
        <img src="daywinddir.png"   alt="$obs.label.windDir" />
        <img src="daywindvec.png"   alt="$obs.label.windvec" />
        <img src="dayrain.png"      alt="$obs.label.rain" />
        #if $day.UV.has_data
        <img src="dayuv.png"        alt="$obs.label.UV" />
        #end if
        #if $day.radiation.has_data
        <img src="dayradiation.png" alt="$obs.label.radiation" />
        #end if
        #if $day.inTemp.has_data
        <img src="daytempin.png"    alt="$obs.label.inTemp" />
        #end if
        #if $day.inHumidity.has_data
        <img src="dayhumin.png"    alt="$obs.label.inHumidity" />
        #end if
        #if $day.extraTemp1.has_data or $day.extraTemp2.has_data or $day.extraTemp3.has_data
        <img src="daytemp.png"      alt="$obs.label.extraTemp1" />
        #end if
        #if $day.rxCheckPercent.has_data
        <img src="dayrx.png"        alt="$obs.label.rxCheckPercent"/>
        #end if
    </div>
    

    Likewise, there are <div id="history_week"></div>, <div id="history_day"></div> and <div id="history_day"></div> blocks to define the 'week', 'month' and 'year' plot layouts.

  3. To display the newly created daymoist.png plot immediately after the extraTemp1/extraTemp2/extraTemp3 (daytemp.png) plot insert a new <img> tag immediately after the daytemp.png #if..#end if as follows:

        #if $day.extraTemp1.has_data or $day.extraTemp2.has_data or $day.extraTemp3.has_data
        <img src="daytemp.png"      alt="$obs.label.extraTemp1" />
        #end if
        <img src="daymoist.png"      alt="$obs.label.soilMoist1" />
    

    or if you were providing the template for a third party and were uncertain whether they have soilMoist1 you might wrap the <img> tag in an #if..#end if statement as follows:

        #if $day.extraTemp1.has_data or $day.extraTemp2.has_data or $day.extraTemp3.has_data
        <img src="daytemp.png"      alt="$obs.label.extraTemp1" />
        #end if
        #if $day.soilMoist1.has_data
        <img src="daymoist.png"      alt="$obs.label.soilMoist1" />
        #end if
    
  4. Repeat step 3 for 'week', 'month' and 'year' in the corresponding <div id="history_xxxx"></div>blocks noting the plot file name will be different for each block.

  5. Save skins/Seasons/index.html.tmpl and the next report cycle should see the soilMoist1 plots appear in the History panel provided you have soilMoist1 in your archive. Note you may have to refresh the page for the updated data to be displayed.

Note: Any problems or errors in the modified index.html.tmpl should not cause WeeWX to exit; however, it may cause WeeWX to fail to generate the Seasons skin main page. In such cases check the WeeWX log for log entries that may indicate the source of the problem. If the problem cannot be immediately fixed you can revert to the original index.html.tmpl by deleting the modified index.html.tmpl and re-instating the original index.html.tmpl. For setup.py installs:

$ rm /home/weewx/skins/Seasons/index.html.tmpl
$ mv /home/weewx/skins/Seasons/index_orig.html.tmpl /home/weewx/skins/Seasons/index.html.tmpl

or for package installs:

$ rm /etc/weewx/skins/Seasons/index.html.tmpl
$ mv /etc/weewx/skins/Seasons/index_orig.html.tmpl /etc/weewx/skins/Seasons/index.html.tmpl

To add a new observation to the Statistics page

Note: Depending on your system configuration some or all of the following commands may need to be prefixed with sudo or otherwise executed by a user account with privileged system access.

  1. Make a copy of the existing skins/Seasons/statistics.inc so it is possible to easily revert to a working configuration if a mistake is made. For setup.py installs:

    $ cp /home/weewx/skins/Seasons/statistics.inc /home/weewx/skins/Seasons/statistics_orig.inc
    

    or for package installs:

    $ cp /etc/weewx/skins/Seasons/statistics.inc /etc/weewx/skins/Seasons/statistics_orig.inc
    
  2. Edit skins/Seasons/statistics.inc. If you look at the structure of the file from around line 15 onwards you will notice a HTML <table></table> block. The template constructs a HTML table containing columns for 'today', 'week', 'month', 'year' and 'rain year' and rows for each observation. Within the <table></table> block you will notice a repeated series of HTML like code between <tr></tr> HTML tags, for example:

    <tr>
        <td></td>
        <td></td>
        <th>Today</th>
        <th class="hilo_week">Week</th>
        <th class="hilo_month">Month</th>
        <th class="hilo_year">Year</th>
        <th class="hilo_rainyear">Rain year</th>
    </tr>
    <tr>
        <td class="label">$obs.label.outTemp</td>
        <td class="units">$unit.label.outTemp</td>
        #for $archive in $archive_data
        <td class="data new_row">$archive.outTemp.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.outTemp.maxtime</span><br/>
            $archive.outTemp.min.format(add_label=False)<br/>
            <span class="timestamp">$archive.outTemp.mintime</span>
        </td>
        #end for
    </tr>
    <tr>
        <td class="label">$obs.label.heatindex</td>
        <td class="units">$unit.label.heatindex</td>
        #for $archive in $archive_data
        <td class="data new_row">$archive.heatindex.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.heatindex.maxtime</span>
        </td>
        #end for
    </tr>
    

    This particular extract shows three <tr></tr> blocks that display column headings, the outTemp max/min row and the heatindex max row. Each observation utilises a row in a HTML table (the <tr></tr> tags) though some rows such as outTemp display two sub-rows of data, max and min. Each row consists of three fields defined by the three pairs of <td></td> tags. The <td></td> tags with class='label' display the label for the observation. The <td></td> tags with class='data' display the aggregate value and the <td></td> tags with class='units' display the units for the observation. A WeeWX report tag is used to display the relevant label and units. The #for..#end for block is used to iterate over the aggregate periods displayed in the table and appropriate WeeWX report tags are used to display the applicable aggregate value.

  3. Locate where in the list of observations you wish the new observation to appear and then insert the appropriate <tr></tr>/<td></td> lines and WeeWX report tags. For example, and following on from the Current Conditions panel example above, to display the soilMoist1 high/low values immediately after heatindex you might use the following:

    <tr>
        <td class="label">$obs.label.heatindex</td>
        <td class="units">$unit.label.heatindex</td>
        #for $archive in $archive_data
        <td class="data new_row">$archive.heatindex.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.heatindex.maxtime</span>
        </td>
        #end for
    </tr>
    <tr>
        <td class="label">$obs.label.soilMoist1</td>
        <td class="units">$unit.label.soilMoist1</td>
        #for $archive in $archive_data
        <td class="data new_row">$archive.soilMoist1.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.soilMoist1.maxtime</span><br/>
            $archive.soilMoist1.min.format(add_label=False)<br/>
            <span class="timestamp">$archive.soilMoist1.mintime</span>
        </td>
        #end for
    </tr>
    

    If you wanted to display just the soilMoist1 high value you might use the following:

    <tr>
        <td class="label">$obs.label.heatindex</td>
        <td class="units">$unit.label.heatindex</td>
        #for $archive in $archive_data
        <td class="data new_row">$archive.heatindex.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.heatindex.maxtime</span>
        </td>
        #end for
    </tr>
    <tr>
        <td class="label">$obs.label.soilMoist1</td>
        <td class="units">$unit.label.soilMoist1</td>
        #for $archive in $archive_data
        <td class="data new_row">$archive.soilMoist1.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.soilMoist1.maxtime</span><br/>
        </td>
        #end for
    </tr>
    

    Again following on from the Current Conditions panel example above if you were providing this template for use by others who might not have soilMoist1 you might place an #if..#end if statement around your new lines as follows:

    <tr>
        <td class="label">$obs.label.heatindex</td>
        <td class="units">$unit.label.heatindex</td>
        #for $archive in $archive_data
        <td class="data new_row">$archive.heatindex.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.heatindex.maxtime</span>
        </td>
        #end for
    </tr>
    #if $day.soilMoist1.has_data
    <tr>
        <td class="label">$obs.label.soilMoist1</td>
        <td class="units">$unit.label.soilMoist1</td>
        #for $archive in $archive_data
        <td class="data new_row">$archive.soilMoist1.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.soilMoist1.maxtime</span><br/>
        </td>
        #end for
    </tr>
    #end if    
    

    This way users that do not have a soil moisture sensor will not see a soil moisture label and placeholder on the Statistics page.

  4. Save skins/Seasons/statistics.inc and the next report cycle should see the soilMoist1 data appear on the Statistics page provided you have soilMoist1 in your archive. Note you may have to refresh the page for the updated data to be displayed.

    Note: Any problems or errors in the modified statistics.inc should not cause WeeWX to exit; however, it may cause WeeWX to fail to generate the Seasons skin main page. In such cases check the WeeWX log for log entries that may indicate the source of the problem. If the problem cannot be immediately fixed you can revert to the original statistics.inc by deleting the modified statistics.inc and re-instating the original statistics.inc. For setup.py installs:

     $ rm /home/weewx/skins/Seasons/statistics.inc
     $ mv /home/weewx/skins/Seasons/statistics_orig.inc /home/weewx/skins/Seasons/statistics.inc
    

    or for package installs:

     $ rm /etc/weewx/skins/Seasons/statistics.inc
     $ mv /etc/weewx/skins/Seasons/statistics_orig.inc /etc/weewx/skins/Seasons/statistics.inc