There's already a type for luminosity, but it's called "illuminance",
introduced in V4.2. It's a member of group_illuminance.

See issue #613 <https://github.com/weewx/weewx/issues/613>, in particular, this
post. <https://github.com/weewx/weewx/issues/613#issuecomment-716136794>

On Tue, Feb 16, 2021 at 1:01 PM 'Jan-Jaap van der Geer' via weewx-user <
weewx-user@googlegroups.com> wrote:

> I have added a luminosity graph to weewx (Seasons skin). It seems to work,
> the graph works. However, it does not mention the unit used at the top
> left, like the others do.
>
> I am trying to fix this, but I'm not sure how.
>
> In the weewx.conf I added, under [[[Units]]] in [[[[Groups]]]] :
>
> group_illuminance = lux
>
> (I think that shouldn't be needed as there is only one choice of unit for
> illuminance?)
>
> Under [[[[StringFormats]]]] I have added:
>
> lux = %.0f
>
> And under [[[[Labels]]]] I have:
>
> lux = " lux"
>
> But apparently I'm still missing something. But what?
>
> Also in the high/low part of the template I tried adding Luminosity like
> so:
>
>       #if $day.luminosity.has_data
>       <tr>
>         <td class="label">$obs.label.luminosity</td>
>         #for $archive in $archive_data
>         <td class="data new_row hilo_$archive[0]">
>           <span title="$archive[1].luminosity.maxtime">
>             $archive[1].luminosity.max.format(add_label=False)</span><br/>
>           <span title="$archive[1].luminosity.mintime">
>             $archive[1].luminosity.min.format(add_label=False)</span>
>         </td>
>         #end for
>         <td class="units">$unit.label.luminosity</td>
>       </tr>
>       #end if
>
> But also this is not showing the unit and the format is 6 digits after the
> floating point, which is a bit overkill.
>
> Any suggestion how to fix this?
>
> Cheers,
> Jan-Jaap
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/52f9dece-add1-44bb-8ee3-e447a5e97592n%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/52f9dece-add1-44bb-8ee3-e447a5e97592n%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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zECStZ5kj8J0dzh%2BXpH9n7SuOMG9DwnTss9srxZVxVQmOw%40mail.gmail.com.

Reply via email to