Thanks! The .raw made the decisive difference
Am Sonntag, 11. August 2019 19:01:37 UTC+2 schrieb Pat:
>
> Hi Manfred, I took this one right from the Season's skin, but modified it
> slightly to include the CSS color so it was inline. Give this a try (remove
> it from the table's tr's and td's if you're not using a table)
>
> #if $day.txBatteryStatus.has_data
> <tr>
> <td style="text-align:right; padding:4px 8px 0 0;">
> Transmitter Battery</td>
> <td style="text-align:left; font-weight:bold;
> padding-top:4px;">
> #if $current.txBatteryStatus.raw == 0
> <span style="color:#44aa44;">OK</span>
> #else
> <span style="color:#aa4444;">LOW</span>
> #end if
> </td>
> </tr>
> #end if
>
>
> On Sunday, August 11, 2019 at 9:44:24 AM UTC-4, Manfred Maier wrote:
>>
>> Thanks Pat! It works.
>>
>> Yet, my website coding skills are unfortunately not the best.
>> How does your code look like, where you translate the
>> $current.txBatteryStatus into a green 'OK' (on your about-page)?
>> I've tried all different kinds of if-statements but none worked.
>>
>>
>>
>> Am Sonntag, 11. August 2019 04:16:34 UTC+2 schrieb Pat:
>>>
>>> Is your station or driver tracking the rxCheckPercent? (check your
>>> database to see if its populated). If so then try $current.rxCheckPercent
>>> for the text representation.
>>>
>>> To graph it add this to your graphs.conf
>>>
>>> [about]
>>> show_button = false
>>> time_length = 172800 # 48 hours in seconds
>>> aggregate_type = last
>>> aggregate_interval = 300 # 5 min
>>> gapsize = 300000 # 5 min
>>>
>>> [[rxchart]]
>>> title = ISS Receive Stats
>>> yaxis_max = 100
>>> [[[rxCheckPercent]]]
>>> color = "#268bd2"
>>>
>>> [[rxchartyear]]
>>> title = ISS Receive Stats Average
>>> yaxis_max = 100
>>> xaxis_groupby = month
>>> xaxis_categories = 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
>>> 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
>>> time_length = year
>>> [[[rxCheckPercent]]]
>>> aggregate_type = avg
>>> color = "#268bd2"
>>>
>>>
>>>
>>> Then at the top of your about.inc add this line which initializes
>>> Highcharts for the [about] graph group
>>>
>>> <script type='text/javascript'>showChart("about");</script>
>>>
>>>
>>> Then inside your about.inc where you want the graph to actually appear
>>> add this:
>>>
>>> <div id="rxchart" style="margin-top:30px;"></div>
>>> <div id="rxchartyear" style="margin-top:30px;"></div>
>>>
>>>
>>> Basically the top of the about.inc will initialize the Highcharts
>>> [about] code, and the <div>'s tell it where to put those charts. You can
>>> see that the <div ID> is the same name as the chart name inside the [about]
>>> graph group.
>>>
>>> With this simple logic in mind, you can put any chart on any page you
>>> want.
>>>
>>>
>>> On Saturday, August 10, 2019 at 5:13:31 PM UTC-4, Manfred Maier wrote:
>>>>
>>>> Hi Pat,
>>>> a quick question:
>>>> How do I get the Signal Quality / ISS Receive Stats onto the About
>>>> page? I've tried $station.rxCheckPercent, but that triggered an error.
>>>>
>>>> Is the about.inc of your page somewhere available?
>>>>
>>>> Thanks!
>>>> Manfred.
>>>>
>>>>
>>>>
--
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 on the web visit
https://groups.google.com/d/msgid/weewx-user/399a331c-84f1-41a0-be46-c72b705d7942%40googlegroups.com.