Well, speaking for me, I would like to show this information (last time it rained) using a tag, and put it in index_hook_after_station_info.inc The tag is $time_since_last_rain.
Having done that (putting the tag in that inc-file), it throws an error NameMapper.NotFound while the generator is doing its thing. Looking at the html the skin lastrain produces, it shows the correct last datetime it rained. I guess (in my own words) it's the case that calculated variables in one skin can not be used in another skin? Is this true?
Jun 8 08:53:18 weewx weewx[99172] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 1.24 seconds
Jun 8 08:53:19 weewx weewx[99172] INFO weewx.imagegenerator: Generated 15 images for report SeasonsReport in 0.41 seconds
Jun 8 08:53:19 weewx weewx[99172] INFO weewx.reportengine: Copied 5 files to /var/www/html/weewx
Jun 8 08:53:19 weewx weewx[99172] INFO weewx.restx: MQTT: Published record 2020-06-08 08:53:19 CEST (1591599199)
Jun 8 08:53:19 weewx weewx[99172] message repeated 2 times: [ INFO weewx.restx: MQTT: Published record 2020-06-08 08:53:19 CEST (1591599199)]
Jun 8 08:53:20 weewx weewx[99172] ERROR weewx.cheetahgenerator: Generate failed with exception '<class 'NameMapper.NotFound'>'
Jun 8 08:53:20 weewx weewx[99172] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/Belchertown/index.html.tmpl
Jun 8 08:53:20 weewx weewx[99172] ERROR weewx.cheetahgenerator: **** Reason: cannot find 'time_since_last_rain'
Jun 8 08:53:20 weewx weewx[99172] ERROR weewx.cheetahgenerator: **** Traceback (most recent call last):
Jun 8 08:53:20 weewx weewx[99172] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 322, in generate
Jun 8 08:53:20 weewx weewx[99172] ERROR weewx.cheetahgenerator: **** unicode_string = compiled_template.respond()
Jun 8 08:53:20 weewx weewx[99172] ERROR weewx.cheetahgenerator: **** File "_etc_weewx_skins_Belchertown_index_html_tmpl.py", line 1261, in respond
Jun 8 08:53:20 weewx weewx[99172] ERROR weewx.cheetahgenerator: **** File "/usr/lib/python3/dist-packages/Cheetah/Template.py", line 1708, in _handleCheetahInclude
Jun 8 08:53:20 weewx weewx[99172] ERROR weewx.cheetahgenerator: **** self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
Jun 8 08:53:20 weewx weewx[99172] ERROR weewx.cheetahgenerator: **** File "cheetah__etc_weewx_skins_Belchertown_index_hook_after_station_info_inc_1591599200_376662_26334.py", line 90, in respond
Jun 8 08:53:20 weewx weewx[99172] ERROR weewx.cheetahgenerator: **** NameMapper.NotFound: cannot find 'time_since_last_rain'
Jun 8 08:53:20 weewx weewx[99172] INFO weewx.restx: MQTT: Published record 2020-06-08 08:53:21 CEST (1591599201)
Jun 8 08:53:21 weewx weewx[99172] INFO weewx.cheetahgenerator: Generated 10 files for report Belchertown in 1.86 seconds
Op woensdag 3 juni 2020 14:11:27 UTC+2 schreef Pat: