That works perfectly thanks Thomas, now I just need to get the cron job 
working properly

On Monday, March 16, 2020 at 3:13:26 PM UTC, Thomas Keffer wrote:
>
> For this to work, you would need to specify your new 'contexts' in the 
> constructor to TimespanBinder. Something like this (NOT TESTED):
>
>         # First, create TimespanBinder object for all time. This one is 
> easy
>         # because the object timespan already holds all valid times to be
>         # used in the report.
>         all_stats = TimespanBinder(timespan,
>                                    db_lookup,
>                                    context='alltime',
>                                    formatter=self.generator.formatter,
>                                    converter=self.generator.converter,
>                                    skin_dict=self.generator.skin_dict)     
>   # 4
>
> See if that helps.
>
> -tk
>
>
>
> On Mon, Mar 16, 2020 at 7:35 AM Mike Revitt <[email protected] 
> <javascript:>> wrote:
>
>> I am successfully running the stats.py extension as detailed here 
>> http://www.weewx.com/docs/customizing.htm#defining_new_tags and am now 
>> trying to format the output.
>>
>>
>> The output is displayed in statistics.html using the syntax shown below
>>
>> <table>
>>     <tr>
>>         <td>Maximum temperature to date: </td>
>>         <td>$alltime.outTemp.max</td>
>>     </tr>
>>     <tr>
>>         <td>Minimum temperature to date: </td>
>>         <td>$alltime.outTemp.min
>>     </tr>
>>     <tr>
>>         <td>Rain over the last seven days: </td>
>>         <td>$seven_day.rain.sum
>>     </tr>
>> </table>
>>
>> and I created 2 new tags in weewx.conf expecting this to change the 
>> format as shown below
>>
>>             [[[[TimeFormats]]]]
>>                 
>>                 hour        = %H:%M
>>                 day         = %H:%M
>>                 seven_day   = %H:%M on %a
>>                 week        = %H:%M on %a
>>                 month       = %a %d %H:%M
>>                 year        = %a %d-%b %H:%M
>>                 rainyear    = %d-%b-%Y %H:%M
>>                 alltime     = %A %d-%b-%Y %H:%M
>>                 current     = %a %d-%b-%Y %H:%M
>>                 ephem_day   = %H:%M
>>                 ephem_year  = %d-%b-%Y %H:%M
>>
>>
>> However whilst the day, week and year tags are being used seven_day and 
>> alltime are being ignored. The output that is using used is the current 
>> format.
>>
>> Anyone know what I am doing wrong?
>>
>> -- 
>> 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 [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/9ec3620f-4154-4506-9194-4b880a318776%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/9ec3620f-4154-4506-9194-4b880a318776%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/a33769e7-a403-411b-98f4-24cb60b26da6%40googlegroups.com.

Reply via email to