Hello Thomas. I found the mistake. When we create the new table, we use the name weewx.sdb_new instead of the weewx.sdb. Have this now adjusted in the weewx.conf and lo and behold, num works it. The rest I had done, but unfortunately not this detail. Many thanks to all helpers. Class like that works.
Your code also works great: #set hours = int ($ current.sunshine_hours.raw) #set minutes = int (($ current.sunshine_hours.raw - $ hours) * 60 + 0.5) <sun value = "$ hours h $ minutes m" /> Many Thanks Am Dienstag, 23. Juli 2019 13:09:25 UTC+2 schrieb Thomas Keffer: > > The type "sunshine_hours" is not in your database. It will work with > "$current" because you have a current record, so weewx is using that. But, > because it is not in your database, weewx cannot sum over the day. > > See the section *Adding a new type to the database > <http://weewx.com/docs/customizing.htm#add_archive_type>* in the > Customizing Guide for how to do this. > > -tk > > > On Tue, Jul 23, 2019 at 4:00 AM Stefan <sschn...@bluewin.ch <javascript:>> > wrote: > >> This is with $current.sunshine_hours.raw. It works! >> >> <solar> >> <solar value="861"/> >> <solar_max value="861"/> >> <solar_max_time value="12:51"/> >> <sun value="0.0833333333333"/> >> </solar> >> >> But with $day.sunshine_hours.raw or $day.sunshine_hours.sum.raw or >> $day.sunshine_hours.raw.sum >> The Problem always turns up when replacing $current by $day. >> >> >> >> 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 weewx...@googlegroups.com <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/weewx-user/5ddf5a22-a565-4e12-9093-5c69d187e420%40googlegroups.com >> >> <https://groups.google.com/d/msgid/weewx-user/5ddf5a22-a565-4e12-9093-5c69d187e420%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 weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/ed3df467-8a46-407b-823e-d150eff876de%40googlegroups.com.