Hello.
Here is the Code:
<solar>
<solar value="$current.radiation.formatted"/>
<solar_max value="$day.radiation.max.formatted"/>
<solar_max_time value="$day.radiation.maxtime.format("%H:%M")"/>
#set hours = int($day.sunshine_hours.sum.raw)
#set minutes = int(($day.sunshine_hours.sum.raw - $hours)*60 + 0.5)
<sun value="$hours h $minutes m"/>
</solar>
With $current.sunshine_hours.raw it works! With $day.sunshine_hours.sum.raw
nothing.
The failure Code:
Jul 23 12:30:23 raspberrypi weewx[31508]: cheetahgenerator: **** Ignoring
template /etc/weewx/skins/Seasons/XML/daten.xml.tmpl
Jul 23 12:30:23 raspberrypi weewx[31508]: cheetahgenerator: **** Reason:
cannot find 'sum' while searching for 'day.sunshine_hours.sum'
Jul 23 12:30:23 raspberrypi weewx[31508]: **** Traceback (most recent call
last):
Jul 23 12:30:23 raspberrypi weewx[31508]: **** File
"/usr/share/weewx/weewx/cheetahgenerator.py", line 332, in generate
Jul 23 12:30:23 raspberrypi weewx[31508]: ****
fd.write(str(compiled_template))
Jul 23 12:30:23 raspberrypi weewx[31508]: **** File
"/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in
__str__
Jul 23 12:30:23 raspberrypi weewx[31508]: **** rc = getattr(self,
mainMethName)()
Jul 23 12:30:23 raspberrypi weewx[31508]: **** File
"_etc_weewx_skins_Seasons_XML_daten_xml_tmpl.py", line 309, in respond
Jul 23 12:30:23 raspberrypi weewx[31508]: **** NotFound: cannot find 'sum'
while searching for 'day.sunshine_hours.sum'
Am Dienstag, 23. Juli 2019 08:35:37 UTC+2 schrieb gjr80:
>
> The answer is in the error message. You are using $day.sunshine_hours.raw,
> you should be using $day.sunshine_hours.sum or perhaps
> $day.sunshine_hours.sum.raw
>
> 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/a01dee53-25b8-411f-9392-c5999c4e9213%40googlegroups.com.