On 30/08/2023, Invisible Man <axelle.apvri...@gmail.com> wrote:
> Thanks to both of you for your replies.
>
> - since.py etc are in /usr/share/weewx/user already so indeed I can try and

since.py is part of the weewx-mastodon install.

> use them. I tried to directly use since in the format line of
> weewx-mastodon, but haven't succeeded yet:
> `{since($hour=24).rain.sum:%.3f}` , `{since(hour=24).rain.sum:%.3f}`... not
> sure I can do it like that.

As you found, these won't work on the raw (archive) data.

> - I'll look in the template file.

The example template I mentioned already uses since.py to format the
rain value as ...
$since($hour=9).rain.sum (Australian reporting times)

According to the weewx manual at
http://www.weewx.com/docs.html/latest/customizing.htm#Formatting_examples
A format method to use for your example could be...
$since($hour=9).rain.sum.format("%.3f")
I just tested that method and it works. Apparently we've had 7.429 mm of rain!

> - final option is that I directly tweak wxtoot.py ...
> I'll investigate and post back if I have a question... or with my solution
> if I succeed :)

Done :)

-- 


Cheers
 Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAAraAzicBAehHGmpVc0rjLRw_hoquWyApmB%2B%3DO_hxzjNCkP7TA%40mail.gmail.com.

Reply via email to