Commit a997398c authored by Philipp's avatar Philipp

Introducing i18n build features and english translation. MAY STILL BE BUGGY...

Introducing i18n build features and english translation. MAY STILL BE BUGGY AND INCOMPLETE! PLEASE READ README!
parent 8a271312
This diff is collapsed.
......@@ -15,9 +15,9 @@ See this skin in action at [rabenwetter.de](https://rabenwetter.de)
## Installation
* **Copy `dist/*` to a new folder inside your weewx `skins` directory.**
* **Copy `dist.??/*` to a new folder inside your weewx `skins` directory.**
> **Example:**
> `cp -r template_rabenwetter/dist/* /etc/weewx/skins/Rabenwetter/`
> `cp -r template_rabenwetter/dist.en/* /etc/weewx/skins/Rabenwetter/`
* **Apply supplied patch.**
> **Example:**
......@@ -71,11 +71,31 @@ good enough to see, what you're doing without having to render it through
weewx everytime.
### Distribution
Use grunt to create a usable weeWX skin inside the folder `dist/`:
Use grunt to create a usable weeWX skin inside the folder `dist.en/`:
> `~# grunt`
use `--lang` parameter to produce distribution files for other languages
(only "en" and "de" are supported for now):
> `~# grunt --lang=de`
This will produce localized distribution files inside the folder `dist.de/`.
## Translation
I've introduced i18n features to the build process, so you can easily
translate and build localized versions.
Simply copy and rename `src/i18n/en.json` to match your iso 639-1 language code. e.g: `src/i18n/no.json`, then edit and translate its contents.
There's also the humongous forecast file at `src/archive/current.en.json.tmpl`, you may want to translate. Even if you don't want to, you'll have to copy the english version to one matching your countrycode. e.g: `src/archive/current.no.json.tmpl` or the build process will fail.
The first time, you're adding a new translation, you'll also have to edit the Gruntfile.js and add your new file to the array at line 60:
`locales: ['de', 'en', 'no'],`
When you've done a translation, please also send it to me! I'm happy to add it to the official build!
## Updates
You can always find the latest version of this
[at my gitlab](https://gitlab.ambhost.net/stimpy/template_rabenwetter).
......
This diff is collapsed.
#errorCatcher Echo
#set $YM="%Y %m"
#set $D=" %d"
#set $M=" %b"
#set $Time=" %H:%M"
#set $NODAY=" N/A"
#set $Temp="%6.1f"
#set $Wind="%6.1f"
#set $Dir="%6.0f"
#set $Count="%6d"
#set $NONE=" N/A"
#if $unit.unit_type_dict.group_rain == "mm"
#set $Rain="%6.1f"
#else
#set $Rain="%6.2f"
#end if
MONTHLY CLIMATOLOGICAL SUMMARY for $month_name $year_name
NAME: $station.location
ELEV: $station.altitude LAT: $station.latitude[0]-$station.latitude[1] $station.latitude[2] LONG: $station.longitude[0]-$station.longitude[1] $station.longitude[2]
TEMPERATURE ($unit.label.outTemp.strip()), RAIN ($unit.label.rain.strip()), WIND SPEED ($unit.label.windSpeed.strip())
HEAT COOL AVG
MEAN DEG DEG WIND DOM
DAY TEMP HIGH TIME LOW TIME DAYS DAYS RAIN SPEED HIGH TIME DIR
---------------------------------------------------------------------------------------
#for $day in $month.days
#if $day.barometer.count.raw
$day.dateTime.format($D) $day.outTemp.avg.nolabel($Temp,$NONE) $day.outTemp.max.nolabel($Temp,$NONE) $day.outTemp.maxtime.format($Time) $day.outTemp.min.nolabel($Temp,$NONE) $day.outTemp.mintime.format($Time) $day.heatdeg.sum.nolabel($Temp,$NONE) $day.cooldeg.sum.nolabel($Temp,$NONE) $day.rain.sum.nolabel($Rain,$NONE) $day.wind.avg.nolabel($Wind,$NONE) $day.wind.max.nolabel($Wind,$NONE) $day.wind.maxtime.format($Time) $day.wind.vecdir.nolabel($Dir,$NONE)
#else
$day.dateTime.format($D)
#end if
#end for
---------------------------------------------------------------------------------------
$month.outTemp.avg.nolabel($Temp,$NONE) $month.outTemp.max.nolabel($Temp,$NONE) $month.outTemp.maxtime.format($D) $month.outTemp.min.nolabel($Temp,$NONE) $month.outTemp.mintime.format($D) $month.heatdeg.sum.nolabel($Temp,$NONE) $month.cooldeg.sum.nolabel($Temp,$NONE) $month.rain.sum.nolabel($Rain,$NONE) $month.wind.avg.nolabel($Wind,$NONE) $month.wind.max.nolabel($Wind,$NONE) $month.wind.maxtime.format($D) $month.wind.vecdir.nolabel($Dir)
#errorCatcher Echo
#set $YM="%Y %m"
#set $D=" %d"
#set $M=" %b"
#set $NODAY=" N/A"
#set $Temp="%6.1f"
#set $Wind="%6.1f"
#set $Dir="%6.0f"
#set $Count="%6d"
#set $NONE=" N/A"
#if $unit.unit_type_dict.group_temperature == "degree_F"
#set $Hot =(90.0,"degree_F")
#set $Cold =(32.0,"degree_F")
#set $VeryCold=(0.0, "degree_F")
#else
#set $Hot =(30.0,"degree_C")
#set $Cold =(0.0,"degree_C")
#set $VeryCold=(-20.0,"degree_C")
#end if
#if $unit.unit_type_dict.group_rain == "inch"
#set $Trace =(0.01,"inch")
#set $SomeRain =(0.1, "inch")
#set $Soak =(1.0, "inch")
#set $Rain="%6.2f"
#elif $unit.unit_type_dict.group_rain == "mm"
#set $Trace =(.3, "mm")
#set $SomeRain =(3, "mm")
#set $Soak =(30.0,"mm")
#set $Rain="%6.1f"
#else
#set $Trace =(.03,"cm")
#set $SomeRain =(.3, "cm")
#set $Soak =(3.0,"cm")
#set $Rain="%6.2f"
#end if
#def ShowInt($T)
$("%6d" % $T[0])#slurp
#end def
#def ShowFloat($R)
$("%6.2f" % $R[0])#slurp
#end def
CLIMATOLOGICAL SUMMARY for year $year_name
NAME: $station.location
ELEV: $station.altitude LAT: $station.latitude[0]-$station.latitude[1] $station.latitude[2] LONG: $station.longitude[0]-$station.longitude[1] $station.longitude[2]
TEMPERATURE ($unit.label.outTemp.strip())
HEAT COOL MAX MAX MIN MIN
MEAN MEAN DEG DEG >= <= <= <=
YR MO MAX MIN MEAN DAYS DAYS HI DAY LOW DAY $ShowInt($Hot) $ShowInt($Cold) $ShowInt($Cold) $ShowInt($VeryCold)
------------------------------------------------------------------------------------------------
#for $month in $year.months
#if $month.barometer.count.raw
$month.dateTime.format($YM) $month.outTemp.meanmax.nolabel($Temp,$NONE) $month.outTemp.meanmin.nolabel($Temp,$NONE) $month.outTemp.avg.nolabel($Temp,$NONE) $month.heatdeg.sum.nolabel($Temp,$NONE) $month.cooldeg.sum.nolabel($Temp,$NONE) $month.outTemp.max.nolabel($Temp,$NONE) $month.outTemp.maxtime.format($D,$NODAY) $month.outTemp.min.nolabel($Temp,$NONE) $month.outTemp.mintime.format($D,$NODAY) $month.outTemp.max_ge($Hot).nolabel($Count,$NONE) $month.outTemp.max_le($Cold).nolabel($Count,$NONE) $month.outTemp.min_le($Cold).nolabel($Count,$NONE) $month.outTemp.min_le($VeryCold).nolabel($Count,$NONE)
#else
$month.dateTime.format($YM)
#end if
#end for
------------------------------------------------------------------------------------------------
$year.outTemp.meanmax.nolabel($Temp,$NONE) $year.outTemp.meanmin.nolabel($Temp,$NONE) $year.outTemp.avg.nolabel($Temp,$NONE) $year.heatdeg.sum.nolabel($Temp,$NONE) $year.cooldeg.sum.nolabel($Temp,$NONE) $year.outTemp.max.nolabel($Temp,$NONE) $year.outTemp.maxtime.format($M,$NODAY) $year.outTemp.min.nolabel($Temp,$NONE) $year.outTemp.mintime.format($M,$NODAY) $year.outTemp.max_ge($Hot).nolabel($Count,$NONE) $year.outTemp.max_le($Cold).nolabel($Count,$NONE) $year.outTemp.min_le($Cold).nolabel($Count,$NONE) $year.outTemp.min_le($VeryCold).nolabel($Count,$NONE)
PRECIPITATION ($unit.label.rain.strip())
MAX ---DAYS OF RAIN---
OBS. OVER
YR MO TOTAL DAY DATE $ShowFloat(Trace) $ShowFloat($SomeRain) $ShowFloat($Soak)
------------------------------------------------
#for $month in $year.months
#if $month.barometer.count.raw
$month.dateTime.format($YM) $month.rain.sum.nolabel($Rain,$NONE) $month.rain.maxsum.nolabel($Rain,$NONE) $month.rain.maxsumtime.format($D,$NODAY) $month.rain.sum_ge($Trace).nolabel($Count,$NONE) $month.rain.sum_ge($SomeRain).nolabel($Count,$NONE) $month.rain.sum_ge($Soak).nolabel($Count,$NONE)
#else
$month.dateTime.format($YM)
#end if
#end for
------------------------------------------------
$year.rain.sum.nolabel($Rain,$NONE) $year.rain.maxsum.nolabel($Rain,$NONE) $year.rain.maxsumtime.format($M,$NODAY) $year.rain.sum_ge($Trace).nolabel($Count,$NONE) $year.rain.sum_ge($SomeRain).nolabel($Count,$NONE) $year.rain.sum_ge($Soak).nolabel($Count,$NONE)
WIND SPEED ($unit.label.windSpeed.strip())
DOM
YR MO AVG HI DATE DIR
-----------------------------------
#for $month in $year.months
#if $month.barometer.count.raw
$month.dateTime.format($YM) $month.wind.avg.nolabel($Wind,$NONE) $month.wind.max.nolabel($Wind,$NONE) $month.wind.maxtime.format($D,$NODAY) $month.wind.vecdir.nolabel($Dir,$NONE)
#else
$month.dateTime.format($YM)
#end if
#end for
-----------------------------------
$year.wind.avg.nolabel($Wind,$NONE) $year.wind.max.nolabel($Wind,$NONE) $year.wind.maxtime.format($M,$NODAY) $year.wind.vecdir.nolabel($Dir,$NONE)
<?xml version="1.0"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" >
<channel>
<title>$station.location, Weather Conditions</title>
<link>$station.station_url</link>
<description>Current conditions, and daily, monthly, and yearly summaries</description>
<language>en-us</language>
<pubDate>$current.dateTime.format("%a, %d %b %Y %H:%M:%S %Z")</pubDate>
<lastBuildDate>$current.dateTime.format("%a, %d %b %Y %H:%M:%S %Z")</lastBuildDate>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>weewx $station.version</generator>
<ttl>$current.interval.string('')</ttl>
<item>
<title>Weather Conditions at $current.dateTime</title>
<link>$station.station_url</link>
<description>
Outside temperature: $current.outTemp;
Barometer: $current.barometer;
Wind: $current.windSpeed from $current.windDir;
Rain rate: $current.rainRate;
Inside temperature: $current.inTemp
</description>
<pubDate>$current.dateTime.format("%a, %d %b %Y %H:%M:%S %Z")</pubDate>
<geo:lat>$station.latitude_f</geo:lat>
<geo:long>$station.longitude_f</geo:long>
<content:encoded><![CDATA[
<p>
Time: $current.dateTime<br/>
Outside Temperature: $current.outTemp<br/>
Inside Temperature: $current.inTemp<br/>
Wind Chill: $current.windchill<br/>
Heat Index: $current.heatindex<br/>
Dewpoint: $current.dewpoint<br/>
Humidity: $current.outHumidity<br/>
Barometer: $current.barometer<br/>
Wind: $current.windSpeed from $current.windDir<br/>
Rain Rate: $current.rainRate<br/>
</p>
]]></content:encoded>
</item>
<item>
<title>Daily Weather Summary as of $current.dateTime</title>
<link>$station.station_url</link>
<description>
Min outside temperature: $day.outTemp.min at $day.outTemp.mintime;
Max outside temperature: $day.outTemp.max at $day.outTemp.maxtime;
Min inside temperature: $day.inTemp.min at $day.inTemp.mintime;
Max inside temperature: $day.inTemp.max at $day.inTemp.maxtime;
Min barometer: $day.barometer.min at $day.barometer.mintime;
Max barometer: $day.barometer.max at $day.barometer.maxtime;
Max wind : $day.wind.max from $day.wind.gustdir at $day.wind.maxtime;
Rain today: $day.rain.sum
</description>
<pubDate>$current.dateTime.format("%a, %d %b %Y %H:%M:%S %Z")</pubDate>
<geo:lat>$station.latitude_f</geo:lat>
<geo:long>$station.longitude_f</geo:long>
<content:encoded><![CDATA[
<p>
Day: $day.dateTime.format("%d %b %Y")<br/>
Min Outside Temperature: $day.outTemp.min at $day.outTemp.mintime<br/>
Max Outside Temperature: $day.outTemp.max at $day.outTemp.maxtime<br/>
Min Inside Temperature: $day.inTemp.min at $day.inTemp.mintime<br/>
Max Inside Temperature: $day.inTemp.max at $day.inTemp.maxtime<br/>
Min Barometer: $day.barometer.min at $day.barometer.mintime<br/>
Max Barometer: $day.barometer.max at $day.barometer.maxtime<br/>
Max Wind : $day.wind.max from $day.wind.gustdir at $day.wind.maxtime<br/>
Rain today: $day.rain.sum<br/>
</p>
]]></content:encoded>
</item>
<item>
<title>Monthly Weather Summary as of $current.dateTime</title>
<link>$station.station_url/month.html</link>
<description>
Min outside temperature: $month.outTemp.min at $month.outTemp.mintime;
Max outside temperature: $month.outTemp.max at $month.outTemp.maxtime;
Min inside temperature: $month.inTemp.min at $month.inTemp.mintime;
Max inside temperature: $month.inTemp.max at $month.inTemp.maxtime;
Min barometer: $month.barometer.min at $month.barometer.mintime;
Max barometer: $month.barometer.max at $month.barometer.maxtime;
Max wind : $month.wind.max from $month.wind.gustdir at $month.wind.maxtime;
Rain total for month: $month.rain.sum
</description>
<pubDate>$current.dateTime.format("%a, %d %b %Y %H:%M:%S %Z")</pubDate>
<content:encoded><![CDATA[
<p>
Month: $month.dateTime.format("%B %Y")<br/>
Max Outside Temperature: $month.outTemp.max at $month.outTemp.maxtime<br/>
Min Outside Temperature: $month.outTemp.min at $month.outTemp.mintime<br/>
Max Inside Temperature: $month.inTemp.max at $month.inTemp.maxtime<br/>
Min Inside Temperature: $month.inTemp.min at $month.inTemp.mintime<br/>
Min Barometer: $month.barometer.min at $month.barometer.mintime<br/>
Max Barometer: $month.barometer.max at $month.barometer.maxtime<br/>
Max Wind : $month.wind.max from $month.wind.gustdir at $month.wind.maxtime<br/>
Rain total for month: $month.rain.sum<br/>
</p>
]]></content:encoded>
</item>
<item>
<title>Yearly Weather Summary as of $current.dateTime</title>
<link>$station.station_url/year.html</link>
<description>
Min outside temperature: $year.outTemp.min at $year.outTemp.mintime;
Max outside temperature: $year.outTemp.max at $year.outTemp.maxtime;
Min inside temperature: $year.inTemp.min at $year.inTemp.mintime;
Max inside temperature: $year.inTemp.max at $year.inTemp.maxtime;
Min barometer: $year.barometer.min at $year.barometer.mintime;
Max barometer: $year.barometer.max at $year.barometer.maxtime;
Max wind : $year.wind.max from $year.wind.gustdir at $year.wind.maxtime;
Rain total for year: $year.rain.sum
</description>
<pubDate>$current.dateTime.format("%a, %d %b %Y %H:%M:%S %Z")</pubDate>
<content:encoded><![CDATA[
<p>
Year: $year.dateTime.format("%Y")<br/>
Max Outside Temperature: $year.outTemp.max at $year.outTemp.maxtime<br/>
Min Outside Temperature: $year.outTemp.min at $year.outTemp.mintime<br/>
Max Inside Temperature: $year.inTemp.max at $year.inTemp.maxtime<br/>
Min Inside Temperature: $year.inTemp.min at $year.inTemp.mintime<br/>
Min Barometer: $year.barometer.min at $year.barometer.mintime<br/>
Max Barometer: $year.barometer.max at $year.barometer.maxtime<br/>
Max Wind : $year.wind.max from $year.wind.gustdir at $year.wind.maxtime<br/>
Rain total for year: $year.rain.sum<br/>
</p>
]]></content:encoded>
</item>
</channel>
</rss>
This diff is collapsed.
#import datetime
#encoding UTF-8
#for $d in $month.days
[
#for $h in $d.hours
{ "dateTime": "$h.dateTime.format("%H:%M")",
#if $h.inTemp.has_data
"inTemp": $h.inTemp.avg.formatted.replace(",", "."),
#else
"inTemp": null,
#end if
#if $h.outTemp.has_data
"outTemp": $h.outTemp.avg.formatted.replace(",", "."),
"outTempTL": $h.outTemp.min.formatted.replace(",", "."),
"outTempTH": $h.outTemp.max.formatted.replace(",", "."),
#else
"outTemp": null,
"outTempTL": null,
"outTempTH": null,
#end if
#if $h.dewpoint.has_data
"dewpoint": $h.dewpoint.avg.formatted.replace(",", "."),
"dewpointTL": $h.dewpoint.min.formatted.replace(",", "."),
"dewpointTH": $h.dewpoint.max.formatted.replace(",", "."),
#else
"dewpoint": null,
"dewpointTL": null,
"dewpointTH": null,
#end if
#if $h.windchill.has_data
"windChill": $h.windchill.avg.formatted.replace(",", "."),
"windChillTL": $h.windchill.min.formatted.replace(",", "."),
#else
"windChill": null,
"windChillTL": null,
#end if
#if $h.heatindex.has_data
"heatIndex": $h.heatindex.avg.formatted.replace(",", "."),
"heatIndexTH": $h.heatindex.max.formatted.replace(",", "."),
#else
"heatIndex": null,
"heatIndexTH": null,
#end if
#if $h.windSpeed.has_data
"windSpeed": $h.windSpeed.avg.formatted.replace(",", "."),
"windSpeedTH": $h.windSpeed.max.formatted.replace(",", "."),
#else
"windSpeed": null,
"windSpeedTH": null,
#end if
#if $h.windDir.has_data
"windDirection": $h.windDir.avg.formatted.replace(",", "."),
#else
"windDirection": null,
#end if
#if $h.barometer.has_data
"pressure": $h.barometer.avg.formatted.replace(",", "."),
"pressureTL": $h.barometer.min.formatted.replace(",", "."),
"pressureTH": $h.barometer.max.formatted.replace(",", "."),
#else
"pressure": null,
"pressureTL": null,
"pressureTH": null,
#end if
#if $h.rain.has_data
"rain": $h.rain.sum.formatted.replace(",", "."),
#else
"rain": null,
#end if
#if $h.rainRate.has_data
"rainrate": $h.rainRate.avg.formatted.replace(",", "."),
"rainrateTH": $h.rainRate.max.formatted.replace(",", "."),
#else
"rainrate": null,
"rainrateTH": null,
#end if
#if $h.outHumidity.has_data
"outHumidity": $h.outHumidity.avg.formatted.replace(",", "."),
"outHumidityTL": $h.outHumidity.min.formatted.replace(",", "."),
"outHumidityTH": $h.outHumidity.max.formatted.replace(",", "."),
#else
"outHumidity": null,
"outHumidityTL": null,
"outHumidityTH": null,
#end if
#if $h.inHumidity.has_data
"inHumidity": $h.inHumidity.avg.formatted.replace(",", "."),
"inHumidityTL": $h.inHumidity.min.formatted.replace(",", "."),
"inHumidityTH": $h.inHumidity.max.formatted.replace(",", "."),
#else
"inHumidity": null,
"inHumidityTL": null,
"inHumidityTH": null,
#end if
#if $h.PM10.has_data
"PM10": $h.PM10.avg.nolabel("%.2f").replace(",", "."),
"PM25": $h.PM25.avg.nolabel("%.2f").replace(",", ".") },
#else
"PM10": null,
"PM25": null },
#end if
#end for
{}
]
#end for
#import datetime
#encoding UTF-8
[
#for $d in $month.days
{ "dateTime": "$d.dateTime.format("%d.")",
#if $d.inTemp.avg.formatted != "0"
"inTemp": $d.inTemp.avg.formatted.replace(",", "."),
"outTemp": $d.outTemp.avg.formatted.replace(",", "."),
"outTempTL": $d.outTemp.min.formatted.replace(",", "."),
"outTempTH": $d.outTemp.max.formatted.replace(",", "."),
"dewpoint": $d.dewpoint.avg.formatted.replace(",", "."),
"dewpointTL": $d.dewpoint.min.formatted.replace(",", "."),
"dewpointTH": $d.dewpoint.max.formatted.replace(",", "."),
"windChill": $d.windchill.avg.formatted.replace(",", "."),
"windChillTL": $d.windchill.min.formatted.replace(",", "."),
"heatIndex": $d.heatindex.avg.formatted.replace(",", "."),
"heatIndexTH": $d.heatindex.max.formatted.replace(",", "."),
"windSpeed": $d.windSpeed.avg.formatted.replace(",", "."),
"windSpeedTH": $d.windSpeed.max.formatted.replace(",", "."),
"windDirection": $d.windDir.avg.formatted.replace(",", "."),
"pressure": $d.barometer.avg.formatted.replace(",", "."),
"pressureTL": $d.barometer.min.formatted.replace(",", "."),
"pressureTH": $d.barometer.max.formatted.replace(",", "."),
"rain": $d.rain.sum.formatted.replace(",", "."),
"rainrate": $d.rainRate.avg.formatted.replace(",", "."),
"rainrateTH": $d.rainRate.max.formatted.replace(",", "."),
"outHumidity": $d.outHumidity.avg.formatted.replace(",", "."),
"outHumidityTL": $d.outHumidity.min.formatted.replace(",", "."),
"outHumidityTH": $d.outHumidity.max.formatted.replace(",", "."),
"inHumidity": $d.inHumidity.avg.formatted.replace(",", "."),
"inHumidityTL": $d.inHumidity.min.formatted.replace(",", "."),
"inHumidityTH": $d.inHumidity.max.formatted.replace(",", "."),
"PM10": $d.PM10.avg.nolabel("%.2f").replace(",", "."),
"PM25": $d.PM25.avg.nolabel("%.2f").replace(",", ".") },
#else
"inTemp": null,
"outTemp": null,
"outTempTL": null,
"outTempTH": null,
"dewpoint": null,
"dewpointTL": null,
"dewpointTH": null,
"windChill": null,
"windChillTL": null,
"heatIndex": null,
"heatIndexTH": null,
"windSpeed": null,
"windSpeedTH": null,
"windDirection": null,
"pressure": null,
"pressureTL": null,
"pressureTH": null,
"rain": null,
"rainrate": null,
"rainrateTH": null,
"outHumidity": null,
"outHumidityTL": null,
"outHumidityTH": null,
"inHumidity": null,
"inHumidityTL": null,
"inHumidityTH": null,
"PM10": null,
"PM25": null },
#end if
#end for
{}
]
#import datetime
#encoding UTF-8
#for $w in $year.spans(interval=604800)
[
#for $d in $w.days
{ "dateTime": "$d.dateTime.format("%a")",
#if $d.inTemp.has_data
"inTemp": $d.inTemp.avg.formatted.replace(",", "."),
#else
"inTemp": null,
#end if
#if $d.outTemp.has_data
"outTemp": $d.outTemp.avg.formatted.replace(",", "."),
"outTempTL": $d.outTemp.min.formatted.replace(",", "."),
"outTempTH": $d.outTemp.max.formatted.replace(",", "."),
#else
"outTemp": null,
"outTempTL": null,
"outTempTH": null,
#end if
#if $d.dewpoint.has_data
"dewpoint": $d.dewpoint.avg.formatted.replace(",", "."),
"dewpointTL": $d.dewpoint.min.formatted.replace(",", "."),
"dewpointTH": $d.dewpoint.max.formatted.replace(",", "."),
#else
"dewpoint": null,
"dewpointTL": null,
"dewpointTH": null,
#end if
#if $d.windchill.has_data
"windChill": $d.windchill.avg.formatted.replace(",", "."),
"windChillTL": $d.windchill.min.formatted.replace(",", "."),
#else
"windChill": null,
"windChillTL": null,
#end if
#if $d.heatindex.has_data
"heatIndex": $d.heatindex.avg.formatted.replace(",", "."),
"heatIndexTH": $d.heatindex.max.formatted.replace(",", "."),
#else
"heatIndex": null,
"heatIndexTH": null,
#end if
#if $d.windSpeed.has_data
"windSpeed": $d.windSpeed.avg.formatted.replace(",", "."),
"windSpeedTH": $d.windSpeed.max.formatted.replace(",", "."),
#else
"windSpeed": null,
"windSpeedTH": null,
#end if
#if $d.windDir.has_data
"windDirection": $d.windDir.avg.formatted.replace(",", "."),
#else
"windDirection": null,
#end if
#if $d.barometer.has_data
"pressure": $d.barometer.avg.formatted.replace(",", "."),
"pressureTL": $d.barometer.min.formatted.replace(",", "."),
"pressureTH": $d.barometer.max.formatted.replace(",", "."),
#else
"pressure": null,
"pressureTL": null,
"pressureTH": null,
#end if
#if $d.rain.has_data
"rain": $d.rain.sum.formatted.replace(",", "."),
#else
"rain": null,
#end if
#if $d.rainRate.has_data
"rainrate": $d.rainRate.avg.formatted.replace(",", "."),