change locale for html.tmpl with weewx 5.0.2

91 views
Skip to first unread message

Juan Antonio Mosquera Casais

unread,
Apr 11, 2024, 1:37:09 PM4/11/24
to weewx-user
I read doc but i dont know this>

I use Belchertown skin, and in skin.conf i generate a meteoclimatic.html.tmpl >

*UPD=$current.dateTime.format("%d-%m-%Y %H:%M")
*TMP=$current.outTemp.formatted
*WND=$current.windSpeed.formatted
*AZI=$current.windDir.formatted
*BAR=$current.barometer.formatted
*HUM=$current.outHumidity.formatted
*SUN=$current.radiation.formatted
*UVI=$current.UV.formatted
*DHTM=$day.outTemp.max.formatted
*DLTM=$day.outTemp.min.formatted
*DHHM=$day.outHumidity.max.formatted
*DLHM=$day.outHumidity.min.formatted
*DHBR=$day.barometer.max.formatted
*DLBR=$day.barometer.min.formatted
*DGST=$day.windGust.max.formatted
*DSUN=$day.radiation.max.formatted
*DHUV=$day.UV.max.formatted
*DPCP=$day.rain.sum.formatted
*WRUN=
*MHTM=$month.outTemp.max.formatted
*MLTM=$month.outTemp.min.formatted
*MHHM=$month.outHumidity.max.formatted
*MLHM=$month.outHumidity.min.formatted
*MHBR=$month.barometer.max.formatted
*MLBR=$month.barometer.min.formatted
*MGST=$month.windGust.max.formatted
*MSUN=$month.radiation.max.formatted
*MHUV=$month.UV.max.formatted
*MPCP=$month.rain.sum.formatted
*YHTM=$year.outTemp.max.formatted
*YLTM=$year.outTemp.min.formatted
*YHHM=$year.outHumidity.max.formatted
*YLHM=$year.outHumidity.min.formatted
*YHBR=$year.barometer.max.formatted
*YLBR=$year.barometer.min.formatted
*YGST=$year.windGust.max.formatted
*YSUN=$year.radiation.max.formatted
*YHUV=$year.UV.max.formatted
*YPCP=$year.rain.sum.formatted
*EOT*

My locale is es_ES but, this meteoclimatic.html.tmpl i want en_US, is posible?

Tom Keffer

unread,
Apr 11, 2024, 3:56:29 PM4/11/24
to weewx...@googlegroups.com
I'm not sure whether it would work, but you could try not localizing the results. For example,

$monthoutTemp.max.format(localize=False)

See if that works.




--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/7c828d07-e48f-42e2-a34e-9c21636d3051n%40googlegroups.com.

Juan Antonio Mosquera Casais

unread,
Apr 12, 2024, 1:03:31 AM4/12/24
to weewx-user
Oh... works... but, show units, i can delete units??

Before:
*TMP=9,1
*WND=0
*AZI=   N/A
*BAR=1030,8

After:
*TMP=9.0 °C
*WND=0 km/h
*AZI=   N/A
*BAR=1030.8 mbar

Karen K

unread,
Apr 12, 2024, 1:21:33 AM4/12/24
to weewx-user
Juan Antonio Mosquera Casais schrieb am Freitag, 12. April 2024 um 07:03:31 UTC+2:
Oh... works... but, show units, i can delete units??

Replace .formatted by .format(add_label=False)
 

Juan Antonio Mosquera Casais

unread,
Apr 12, 2024, 1:47:21 AM4/12/24
to weewx-user
Hi,

Perfect, this works:
*TMP=$current.outTemp.format(localize=False, add_label=False)

Thanks Tom and Karen for your support and patience
Reply all
Reply to author
Forward
0 new messages