Sure. Just tell the report to use hours instead of minutes.

For example, for tags, it becomes $week.sunshine.sum.hour

For a plot, use option 'unit' in skin.conf.

[ImageGenerator]
  ...
  [[week_images]]
    ...
    [[[week_sunshine]]]
      unit = hour
      [[[[sunshine]]]]

All documented in the Customizing Guide
<http://www.weewx.com/docs/customizing.htm>.

On Fri, Jun 3, 2022 at 4:31 PM 'Peter Fletcher' via weewx-user <
[email protected]> wrote:

> As noted in a different thread, I am working on a small extension to
> calculate and store sunshine time (time when the sun is out, rather than
> covered by clouds). I am saving the number of *minutes* of sunshine
> during the archive period in each archive record. Sunshine minutes are fine
> for display on daily reports and graphs, but I would rather display the
> more usual sunshine hours on weekly, monthly, and longer reports. Is there
> an easy way to tell the report generator to scale the units it uses for
> different report periods? I can see this being useful for other categories
> of data, too. You might, for example want to display solar production in Wh
> for the daily reports but in kWh for monthly and longer ones.
>
> I feel that XTypes may provide the answer to this, but couldn't really get
> my head around how it would work, in practice.
>
> --
> 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/2df447f0-c12d-4947-9bf4-9a2ab9491411n%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/2df447f0-c12d-4947-9bf4-9a2ab9491411n%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/CAPq0zEC6Rs90W_ncjuuN8-fNLstCqt%3DdXM-xR4N24Ak%3D5ThnUA%40mail.gmail.com.

Reply via email to