May be : #set minutes = int($day.sunshine_hours.sum.raw - ($hours*60))
Le vendredi 27 mars 2020 13:14:05 UTC+1, Meteo Oberwallis a écrit : > > Hello. > > Thx. Thats Work! I have another Problem. > > A coming point now appears at the minutes, which should not be there. How can > I remove it? > > > <sun_unformatted value="195.0"/> > <sun value="3 h 15.0 m"/> > > Thank you > > Am Freitag, 27. März 2020 12:49:17 UTC+1 schrieb Jacques Terrettaz: >> >> >> Hi, >> With this extension, the sunshine time is recorded as minutes. >> >> So in your case, to have the number of hours, you should divide the sum >> by 60: >> >> >> #set hours = int($day.sunshine_hours.sum.raw*/60*) >> #set minutes = $day.sunshine_hours.sum.raw - ($hours*60) >> >> With a daily sum of 135 minutes , this give: >> hours = int(135/60) = 2 >> minutes = 135-(2*60)= 15 >> >> So >> <sun value="$hours h $minutes m"/> should give now 2 h 15 m >> >> >> >> >> -- 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/e3c8e71a-2a18-4709-9300-77eb504f9ba7%40googlegroups.com.
