Just to get the obvious question out of the way first; you did use 
$day.sunshine_hours.sum didn’t you (as opposed to day.sunshine_hours.sum), the 
‘$’ matters? Might help to post a copy of the actual template code used, you 
would be surprised how often transcription or spelling errors are made and not 
noticed.

If you did use the ‘$’, did you follow the instructions you linked earlier in 
their entirety; in particular steps 3 and 4 to add sunshine_hours to your 
database schema?

Gary



current will give you the amount of sunshine hours in the last archive period. 
Based on the code linked it will be either the archive period or zero, 
depending on whether the threshold was reached. That’s a bit like 
$current.rain, the rainfall in the last archive period, not really what most 
folks want. I suspect you really want to use an aggregate in there, if you have 
followed the linked instructions then something like $day.sunshine_hours.sum 
will give you today’s total sunshine hours.

If you use $day.sunshine_hours.sum.raw you will get the number of seconds, eg 5 
hours would show 18000. Have a read of the Customization Guide 
(http://weewx.com/docs/customizing.htm#Tags) and learn about tags, their 
formatting and unit conversion and you should be able to do most of what you 
want.

Gary

-- 
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/38bdcfd1-2acf-4d73-b3dc-5bef94f4ce26%40googlegroups.com.

Reply via email to