## xstats for weewx - Copyright 2014-2023 Matthew Wall
#errorCatcher Echo
#encoding UTF-8
##
<!DOCTYPE html>
<html>
  <head>
    ## Specifying an encoding of UTF-8 is usually safe:
    <meta charset="UTF-8">
    <title>xstats</title>
    <style>
body {
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 10pt;
  background-color: #ffffff;
}	
    </style>
  </head>

  <body>
    $current.dateTime<br/>
    current temperature: $current.outTemp<br/>
    day average: $day.outTemp.avg<br/>
    week average: $week.outTemp.avg<br/>
    month average: $month.outTemp.avg<br/>

#if $varExists('seven_day')
    seven day min: $seven_day.outTemp.min<br/>
    seven day avg: $seven_day.outTemp.avg<br/>
    seven day max: $seven_day.outTemp.max<br/>
#else
    <pre>seven_day</pre> is not functioning<br/>
#end if

#if $varExists('thirty_day')
    thirty day min: $thirty_day.outTemp.min<br/>
    thirty day avg: $thirty_day.outTemp.avg<br/>
    thirty day max: $thirty_day.outTemp.max<br/>
#else
    <pre>thirty_day</pre> is not functioning<br/>
#end if

#if $varExists('alltime')
    alltime min: $alltime.outTemp.min<br/>
    alltime avg: $alltime.outTemp.avg<br/>
    alltime max: $alltime.outTemp.max<br/>
#else
    <pre>alltime</pre> is not functioning<br/>
#end if

#if $varExists('last_month')
    last_month rain total: $last_month.rain.sum<br/>
    max temp last month: $last_month.outTemp.max at $last_month.outTemp.maxtime<br/>
    min temp last month: $last_month.outTemp.min at $last_month.outTemp.mintime<br/>
#else
    <pre>last_month</pre> is not functioning<br/>
#end if

#if $varExists('last_year')
    last_year rain total: $last_year.rain.sum<br/>
    max temp last year: $last_year.outTemp.max at $last_year.outTemp.maxtime<br/>
    min temp last year: $last_year.outTemp.min at $last_year.outTemp.mintime<br/>
#else
    <pre>last_year</pre> is not functioning<br/>
#end if

#if $varExists('last_year_todate')
    last_year_todate rain total: $last_year_todate.rain.sum<br/>
    rain total this year: $year.rain.sum<br/>
#else
    <pre>last_year_todate</pre> is not functioning<br/>
#end if
  </body>
</html>
