Why not simply format the .raw value to the required number of decimal
places ?
I do this with my purpleair data from a secondary db, if it helps any....
<tr>
<td class="stats_label">pm2_5_cf_1</td>
<td
class="stats_data">$latest('purpleair_binding').pm2_5_cf_1.formatted
$unit.label.pm2_5_cf_1</td>
</tr>
On Friday, February 28, 2025 at 7:50:18 AM UTC-8 [email protected] wrote:
> Thanks for your reply Tom.
> The problem does not seems here to be due to "false" or "False" since a
> tag such as "$current.pm1_0" is computed as " = 1.1 µg/m³"
> with the " =" before the value of the tag.
> Le vendredi 28 février 2025 à 16:37:20 UTC+1, Tom Keffer a écrit :
>
>> Not sure if this is the problem, but try using "false" instead of "False".
>>
>> On Fri, Feb 28, 2025 at 7:36 AM [email protected] <[email protected]>
>> wrote:
>>
>>> the end of my email was somehow not visible...
>>>
>>> (see http://meteo-sciez.fr/site/mesures.php)
>>>
>>> Do you have any idea why a " =" is added in front of tags for pmx_x
>>> values?
>>>
>>> Le vendredi 28 février 2025 à 16:01:27 UTC+1, Jacques Terrettaz a écrit :
>>>
>>>> Hello,
>>>>
>>>> I have recently installed a Davis Airlink sensor, and configured the
>>>> following weewx plugin :
>>>> https://github.com/chaunceygardiner/weewx-airlink
>>>> I have added to my sqlite database the fields "pm1_0", pm2_5" and
>>>> "pm10_0".
>>>>
>>>> Almost everything seems OK : sqlite database receiveing the date, image
>>>> generator working ( http://meteo-sciez.fr/weewx/airlink/), but I
>>>> still have some problems with template tags :
>>>>
>>>> WIth the following test tmpl file :
>>>>
>>>> pm1-act-label-false|$current.pm1_0.format(add_label=False)
>>>> pm1-act|$current.pm1_0
>>>> pm1-act-raw|$current.pm1_0.raw
>>>> outTemp-act-label-false|$current.outTemp.format(add_label=False)
>>>> outTemp-act|$current.outTemp.format
>>>> outTemp-act-raw|$current.outTemp.raw
>>>>
>>>> the output is :
>>>>
>>>> pm1-act-label-false|*= *1.1
>>>> pm1-act|*= *1.1 µg/m³
>>>> pm1-act-raw|1.0662251655629138
>>>> outTemp-act-label-false|10.7
>>>> outTemp-act|10.7 °C
>>>> outTemp-act-raw|10.72222222222222
>>>>
>>>> (see http://meteo-sciez.fr/weewx/tagssciez/testpm.txt
>>>>
>>>> Only for pm1_0, pm2_5 and pm10_0, there is a " =" at the beginning for
>>>> tags such as "$current.pmX_X" or "$current.pmX_X.format(add_label=False)"
>>>>
>>>> This " =" is visible also for a skin such as weewx-wdc :
>>>>
>>> --
>>> 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 visit
>>> https://groups.google.com/d/msgid/weewx-user/984792f5-30a2-49f9-aecc-b8e857816be0n%40googlegroups.com
>>>
>>> <https://groups.google.com/d/msgid/weewx-user/984792f5-30a2-49f9-aecc-b8e857816be0n%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 [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/weewx-user/ab075971-088d-4c0a-96cb-2c52d83d1eb4n%40googlegroups.com.