$sun_visible_change.long_form

140 views
Skip to first unread message

Werner Krenn

unread,
Aug 9, 2025, 11:09:31 AM8/9/25
to weewx-user
With $sun_visible_change.long_form I always get 0 minutes, 0 seconds.
I've now figured out the reason for this:
weewx.conf:
[StdReport]
 [[Defaults]]
   [[[Units]]]
      [[[[Groups]]]]
          group_deltatime = hour

With this setting, I get the correct display for sunshine duration and rainfall duration in hours
but not for $sun_visible_change.long_form.
How do I get the correct data for $sun_visible_change.long_form ?

Tom Keffer

unread,
Aug 9, 2025, 5:15:06 PM8/9/25
to weewx...@googlegroups.com
Thank you! Turns out, this triggers a bug. See issue #1009. Fix in commit 153c74e.

Is there any particular reason why you are specifying that delta times should be in hours? That's not normally something a user cares about.

-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 visit https://groups.google.com/d/msgid/weewx-user/2a931076-291a-48e3-96ec-729c6c408d32n%40googlegroups.com.

Werner Krenn

unread,
Aug 10, 2025, 6:36:25 AM8/10/25
to weewx-user
> Is there any particular reason why you are specifying that delta times should be in hours?

Graphic with delta_time = hour
Deltatime.png

and graphic where the user has not set delta_time = hour

Nodeltatime.png
I think the representation with delta_time = hour is clearer

Tom Keffer

unread,
Aug 10, 2025, 6:44:18 AM8/10/25
to weewx...@googlegroups.com

vince

unread,
Aug 10, 2025, 12:03:04 PM8/10/25
to weewx-user
Werner - can you share your configuration for the Sunshine and Precipitation duration tables ?    I'd like to add that to my setup here.

Werner Krenn

unread,
Jan 6, 2026, 6:30:15 AM (4 days ago) Jan 6
to weewx-user
Sorry I only just read this.
need the historygenerator.py from bootstrap v3 skin
can you found on Github:

Here is bootstrap 3 used 
skin.conf from Seasons skin:

[BootstrapLabels]
    #
    # Labels specific to the Bootstrap template
    #

    title = "The weather, in ...."
    location_href = "http://en.wikipedia.org/wiki/Royston,_Hertfordshire"
    footer = "© xx 20xx"

    [[headings]]
        front_page  = The Weather
        stats       = Stats
        history     = History
        news        = News
        about       = About
        last_update = Last updated

    [[timespans]]
        day      = Last 24 hours
        today    = Today            # today = any time since midnight
        week     = This week
        month    = This Month
        year     = This Year
        ever     = Since ever

    [[status]]
        latitude       = Latitude:
        longitude      = Longitude:
        altitude       = Altitude:
        station_uptime = Station uptime:
        server_uptime  = Server uptime:

    [[history_tables]]
        min_temp  = Minimum Temperature
        max_temp  = Maximum Temperature
        avg_temp  = Average Temperature
        rain      = Rainfall
        rain_days = Days of rain
        NOAA      = NOAA Data
        max_windGust = Maximum Gust
        max_radiation = Maximum Radiation
        max_UV = Maximum UV radiation
        max_pressure = Maximum Barometer
        min_pressure = Minimum Barometer
        avg_pressure = Average Barometer
        max_barometer = Maximum Barometer
        min_barometer = Minimum Barometer
        avg_barometer = Average Barometer
        windGust = Windgust
        UV = UV radiation
        pressure = Barometer
        radiation = Solar Radiation
        outTemp_days = Number of summer days (maximum temperature ≥25°C)
        outTemp20_days = Number of warm days (minimum temperature ≥20°C)
        outTemp20x_days = Number of days (minimum temperature ≥17°C)
        outTemp0_days = Number of frost days (minimum temperature ≤0°C)
        outTemp00_days = Number of ice days (maximum temperature ≤0°C)
        vegetations_days = Vegetation days (average temperature ≥5°C)
        sunshineDur = Sunshine duration
        rainDur = Precipitation duration
        hailDur = Precipitation duration Piezo
        rainDur_2 = Precipitation duration VUE

    [[minmax]]
        min = Low
        max = High

############################################################################################
[HistoryReport]

    [[sunshineDur]]
        obs_type = sunshineDur
        aggregate_type = sum
        units = hours
        startdate = 1672531200
        minvalues = 0, 50, 100, 150, 200, 250
        maxvalues = 50, 100, 150, 200, 250, 500
        colors = "#f4f7e1", "#ebf79b", "#f7f74c", "#f9f904", "#f9e468", "#f9d713"
         fontColors = "#000000", "#000000", "#000000", "#000000", "#000000", "#000000"
        summary_column = true

    [[rainDur]]
        obs_type = rainDur
        aggregate_type = sum
        units = hours
        startdate = 1672531200
        minvalues = 0, 25, 50, 75, 100, 150, 200, 250, 300, 350
        maxvalues = 25, 50, 75, 100, 150, 200, 250, 300, 350, 500
        colors = "#efefff", "#07f1ff", "#07d1ff", "#07a1ff", "#0788ff", "#076dff", "#0751ff", "#0737ff", "#0722ff", "#070cff"
         fontColors = "#000000", "#000000", "#ffffff", "#ffffff", "#bbbbbb", "#bbbbbb", "#ffffff", "#ffffff", "#bbbbbb", "#bbbbbb"
        summary_column = true

[CheetahGenerator]
    search_list_extensions = user.historygenerator3.MyXSearch
## historygenerator has been renamed to historygenerator3 because I am also using bootstrap 4.4.

in index.html.tmpl:

    <style type="text/css">

.col-md-8 {
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.col-md-8 table th {
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    border-bottom: 1px solid;
}

.col-md-8 table td {
    font-weight: normal;
    text-align: right;
    font-size: 11px;
    padding-right: 5px;
    padding-left: 5px;
    border-bottom: 1px solid;
}

.history {
  #font-size: calc(8px + 0.5vw);
  font-size: 1.1vw;
  margin-bottom: 30px;
  overflow: auto;
  float: left;
}
    </style>

## after the year graphics 

 <div id="history_chronicle" class="history" style="display:none">
           <div class="col-md-8">
  <h4>$BootstrapLabels.history_tables.sunshineDur</h4>
$sunshineDur_table

 <h4>$BootstrapLabels.history_tables.rainDur</h4>
$rainDur_table
           </div>
          </div>

Karen K

unread,
Jan 6, 2026, 7:16:14 AM (4 days ago) Jan 6
to weewx-user
I looked into the definition of class ValueTuple in units.py. If you think of 2 values of group_time and you subtract them, then the result should have another unit (second instead of unix_epoch) and unit group (group_deltatime instead of group_time). But __sub__ preserves the unit and unit group in this case, too.

Tom Keffer schrieb am Samstag, 9. August 2025 um 23:15:06 UTC+2:
Reply all
Reply to author
Forward
0 new messages