John K
This is whats in the weewx.conf
 [[LoopDataReport]]
        HTML_ROOT = /etc/weewx/webpages/loopdata
        enable = true
        skin = LoopData
        [[[Extras]]]
            loop_data_file = loop-data.txt
            expiration_time = 4
            page_update_pwd = foobar
            googleAnalyticsId = ""
            analytics_host = ""
        [[[Units]]]
            [[[[StringFormats]]]]
                mile_per_hour = %.0f
                degree_C = %.1f
                km_per_hour = %.0f
                degree_F = %.1f
current.ecolightningcount = %.0f

txt file attached and the link to view is
Sher Center <https://sheringhamweathercenter.uk/loopdata/index.html>


On Friday, June 12, 2026 at 2:38:26 PM UTC+1 John Kline wrote:

> We are talking about the formatters associated with the observation.  It 
> *may* be true that, if the observation was set up incorrectly, the database 
> type would have an effect on the output, but the goal here is to properly 
> create the new type.  This is why I have asked the OP to tell me what is 
> displayed in the report.  That takes the extension out of the picture and 
> we can work to get the observation configured correctly.  The loopdata 
> extension, by design, uses the same formatters as the target report.
>
> On Jun 12, 2026, at 4:32 AM, Pablo Sanchez <[email protected]> 
> wrote:
>
>  
>
> It is a database issue because the column's domain should be an integer. 
> Any other data type allows for garbage data to exist.
>
> By design, many DB engines reject data that does not match the domain.
> ---
> pablo
>
> On June 12, 2026 00:32:08 John Smith <[email protected]> wrote:
>
>> This is fundamentally a formatting issue. 
>>
>>
>> It might manifest as a formatting issue, but it's really a database issue 
>> and a waste of bytes storing whole numbers as decimals.
>>
>> I do know that the extended schema has lighthing count as REAL.
>>
>>
>> The defaults are unnecessarily bloated, but I guarantee others on this 
>> list don't want the issue rehashed yet again.
>>
>> On Fri, 12 Jun 2026 at 11:46, 'John Kline' via weewx-user <
>> [email protected]> wrote:
>>
>>> This is fundamentally a formatting issue.  I have this completely 
>>> covered in the extension.
>>>
>>> I don’t know how well weewx will play with observations that are 
>>> integers (but, like I say, this is about formatting).  I do know that the 
>>> extended schema has lighthing count as REAL.
>>>
>>> ('lightning_strike_count',    'REAL'),
>>>
>>> On Jun 11, 2026, at 6:01 PM, John Smith <[email protected]> wrote:
>>>
>>> 
>>> Why would a column for lightning strikes not use INTEGER in the first 
>>> place?
>>>
>>> It's not like you can have a half or third of a lightning strike.
>>>
>>> On Fri, 12 Jun 2026 at 09:35, 'John Kline' via weewx-user <
>>> [email protected]> wrote:
>>>
>>>> Please don’t change the database.  loopdata formats observations as 
>>>> specified by a report.  The reason for this is, typically, the observation 
>>>> values written on every loop record are used to update values in a report. 
>>>>  
>>>> Of course, just like when observations are used in a report, adding .raw 
>>>> will skip the formatting.
>>>>
>>>> On Jun 11, 2026, at 3:01 PM, John Smith <[email protected]> wrote:
>>>>
>>>> 
>>>> The simplest fix would be to remove the column and then re-add it with 
>>>> the INTEGER type instead of REAL.
>>>>
>>>> The slightly more complex fix would be to update the column type in 
>>>> your database by doing something like
>>>>
>>>> ALTER TABLE my_table ADD COLUMN new_col INTEGER;
>>>> UPDATE my_table SET new_col = CAST(old_col AS INTEGER);
>>>> ALTER TABLE my_table DROP COLUMN old_col;
>>>> ALTER TABLE my_table RENAME COLUMN new_col TO old_col;
>>>>
>>>> Although Claude.ai says SQLite columns are dynamically typed, so you 
>>>> could get away with just doing
>>>>
>>>> UPDATE my_table SET col = CAST(col AS INTEGER);
>>>>
>>>> On Fri, 12 Jun 2026 at 01:00, [email protected] <
>>>> [email protected]> wrote:
>>>>
>>>>> weewx version 5.3.1
>>>>> Ive added current.ecolightningcount to the weewx-loopdata ver 3.3.2 
>>>>> program and it updates OK but it displays 6 decimal places. Ive added 
>>>>> various things in weewx.conf but obviously not correctly
>>>>> Coulk somebody put me out of my misery and point me in the right 
>>>>> direction.
>>>>>
>>>>> Thanks Phil
>>>>>
>>>>> -- 
>>>>> 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/32453638-58fc-4a1b-bf38-85e6bcff50den%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/weewx-user/32453638-58fc-4a1b-bf38-85e6bcff50den%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/CAGTinV4d%2Bh78RC82nEbAr2owQEbG3r%2Be3zwS8KPJ_rcYaHYXJQ%40mail.gmail.com
>>>>  
>>>> <https://groups.google.com/d/msgid/weewx-user/CAGTinV4d%2Bh78RC82nEbAr2owQEbG3r%2Be3zwS8KPJ_rcYaHYXJQ%40mail.gmail.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/D2738456-68BF-4254-984B-386411A99E8F%40johnkline.com
>>>>  
>>>> <https://groups.google.com/d/msgid/weewx-user/D2738456-68BF-4254-984B-386411A99E8F%40johnkline.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/CAGTinV51OVgF_%2BFgsPVLbLcUQXyiqvKnfBkaTdFtgE%3DRBvnrkw%40mail.gmail.com
>>>  
>>> <https://groups.google.com/d/msgid/weewx-user/CAGTinV51OVgF_%2BFgsPVLbLcUQXyiqvKnfBkaTdFtgE%3DRBvnrkw%40mail.gmail.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/FF04048C-0414-465C-84E2-543015C11210%40johnkline.com
>>>  
>>> <https://groups.google.com/d/msgid/weewx-user/FF04048C-0414-465C-84E2-543015C11210%40johnkline.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/CAGTinV7QPznu5xEQRWNS8q84nrNk9Gf_2uL2m9Do%2BDB1nboGkQ%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/CAGTinV7QPznu5xEQRWNS8q84nrNk9Gf_2uL2m9Do%2BDB1nboGkQ%40mail.gmail.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/19ebb9ab9a0.2848.44b74f35a7a433c111dbfaee4cca1c2d%40hillsandlakes.com
>  
> <https://groups.google.com/d/msgid/weewx-user/19ebb9ab9a0.2848.44b74f35a7a433c111dbfaee4cca1c2d%40hillsandlakes.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/5b0fd6f7-3463-47c7-9ff3-8c5b4bfd3b0fn%40googlegroups.com.
{"current.rainRate": "0.0 mm/h", "rainyear.rain.sum.formatted": "262.4", 
"current.barometer.formatted": "1014.6", "day.windGust.max.formatted": "23", 
"10m.windGust.max.formatted": "15", "24h.rain.sum.formatted": "0.4", 
"current.dewpoint.formatted": "13.0", "week.outTemp.min.formatted": "8.3", 
"24h.windGust.max": "23 mph", "month.windGust.max.formatted": "23", 
"24h.windGust.max.formatted": "23", "10m.outTemp.min.formatted": "22.9", 
"hour.outTemp.max.formatted": "23.4", "rainyear.windGust.max.formatted": "37", 
"2m.outTemp.min.formatted": "23.4", "current.windSpeed.raw": 7.0, 
"day.wind.rms.formatted": "6", "current.barometer": "1014.6 mbar", 
"2m.rain.sum.formatted": "0.0", "current.dateTime.raw": 1781279300, 
"10m.windGust.max": "15 mph", "hour.windGust.max": "19 mph", 
"year.rain.sum.formatted": "262.4", "day.outTemp.min.formatted": "15.1", 
"trend.barometer.code": -1, "current.windchill": "23.4\u00b0C", 
"month.outTemp.min.formatted": "8.3", "hour.wind.rms.formatted": "8", 
"2m.outTemp.max.formatted": "23.4", "current.outTemp": "23.4\u00b0C", 
"10m.outTemp.max.formatted": "23.4", "year.windGust.max.formatted": "37", 
"alltime.rain.sum.formatted": "10761.6", "day.ecolightning_strike_count.sum": 
"0.000000", "alltime.outTemp.max.formatted": "38.1", "hour.rain.sum.formatted": 
"0.0", "10m.rain.sum.formatted": "0.0", "24h.outTemp.max.formatted": "23.4", 
"alltime.outTemp.min.formatted": "-7.9", "rainyear.outTemp.max.formatted": 
"33.2", "month.wind.rms.formatted": "4", "2m.wind.rms.formatted": "8", 
"current.rainRate.formatted": "0.0", "week.wind.rms.formatted": "4", 
"alltime.windGust.max.formatted": "50", "week.rain.sum.formatted": "20.4", 
"current.rain": "0.0 mm", "alltime.wind.rms.formatted": "5", 
"current.outHumidity": "52%", "trend.outTemp": "3.2\u00b0C", 
"current.windSpeed.formatted": "7", "rainyear.wind.rms.formatted": "4", 
"current.UV.formatted": "1.9", "day.rain.sum": "0.0 mm", 
"24h.outTemp.min.formatted": "12.1", "year.outTemp.max.formatted": "33.2", 
"hour.outTemp.min.formatted": "22.7", "day.rain.sum.formatted": "0.0", 
"10m.wind.rms.formatted": "8", "24h.wind.rms.formatted": "4", 
"current.outTemp.formatted": "23.4", "current.windDir.ordinal_compass": "WNW", 
"current.ecolightningcount": "0.000000", "current.dewpoint": "13.0\u00b0C", 
"hour.windGust.max.formatted": "19", "week.outTemp.max.formatted": "23.4", 
"trend.barometer.desc": "Falling Slowly", "2m.windGust.max.formatted": "15", 
"year.outTemp.min.formatted": "-3.2", "week.windGust.max.formatted": "23", 
"day.windGust.max": "23 mph", "month.rain.sum.formatted": "50.0", 
"year.wind.rms.formatted": "4", "day.outTemp.max.formatted": "23.4", 
"current.windSpeed": "7 mph", "2m.windGust.max": "15 mph", "current.heatindex": 
"23.1\u00b0C", "rainyear.outTemp.min.formatted": "-3.2", 
"month.outTemp.max.formatted": "23.6"}

Reply via email to