weewx and decimal places

62 views
Skip to first unread message

Michael

unread,
Sep 1, 2019, 8:59:40 AM9/1/19
to weewx-user
Hi,

I'm using weewx with the Skin Seasons. Some values (temperatures and humidity) are displayed 6 decimal places. The rest is normal with 1 decimal place. I didn't find a way to adjust it
A short excerpt from the file current.inc:

 

      <tr>

        <td class="label">$obs.label.extraTemp5</td>

        <td class="data">$current.extraTemp5 / $current.extraHumid5</td>

      </tr>

      <tr>

        <td class="label">$obs.label.extraTemp6</td>

        <td class="data">$current.extraTemp6 / $current.extraHumid6</td>

      </tr>

      <tr>

        <td class="label">$obs.label.extraTemp7</td>

        <td class="data">$current.extraTemp7 / $current.extraHumid7</td>

      </tr>

      <tr>

        <td class="label">$obs.label.extraTemp8</td>

        <td class="data">$current.extraTemp8 / $current.extraHumid8</td>

      </tr>


And here the presentation on the website:


I am grateful for any advice on customization:
Michael

Thomas Keffer

unread,
Sep 1, 2019, 10:51:24 AM9/1/19
to weewx-user
The problem is that extraTemp[8,9,10] and extraHumid[8,9,10] are not defined as part of any group, so they revert to the default, which uses standard Python formatting. You're the first person I've encountered that actually has more than 7 temperature sensors!

To fix, put this in your file user/extensions.py:

import weewx.units

weewx.units.obs_group_dict['extraTemp8'] = 'group_temperature'
weewx.units.obs_group_dict['extraTemp9'] = 'group_temperature'
weewx.units.obs_group_dict['extraTemp10'] = 'group_temperature'
weewx.units.obs_group_dict['extraHumid8'] = 'group_percent'
weewx.units.obs_group_dict['extraHumid9'] = 'group_percent'
weewx.units.obs_group_dict['extraHumid10'] = 'group_percent'

Then restart weewx.

-tk




--
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/fb1fdeae-4f28-40a3-8004-5f715f24009c%40googlegroups.com.

Michael

unread,
Sep 1, 2019, 11:25:08 AM9/1/19
to weewx-user
Hi Thomas,

thanks, this works well.

Michael
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages