Skip to content

Conversation

@iseeberg79
Copy link
Contributor

Fix #26164, includes #26413

adds

  • Marker sorting → Prevents incorrect rate assignment due to unsorted time markers
  • Zone specificity logic → Resolves cases with identical hours but different months/days; prefer higher specificity

@evcc-bot evcc-bot added enhancement New feature or request tariffs Specific tariff support labels Jan 4, 2026
}{
// REVERSED: specific first, general second
// Without MoreSpecific, this will fail!
{0.10, "0-5", "Jan-Mar,Oct-Dec"}, // specific (winter only)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am Ende müssen vmtl. auch Überlappungen gehandhabt werden? In jedem Fall wäre es schön diese- wenn nicht vergleichbar- als Fehler identifizieren zu können.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aber nur wenn wirklich "ambigious"? Das braucht ein paar Helper

@iseeberg79
Copy link
Contributor Author

test fails since logging

Comment on lines +81 to +85
// Sort markers by time to ensure correct ordering
slices.SortFunc(res, func(a, b HourMin) int {
return a.Minutes() - b.Minutes()
})

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

major required fix - paired with correcting rates clock

var res api.Rates

start := now.With(t.clock.Now().Local()).BeginningOfDay()
start := now.With(t.clock.Now()).BeginningOfDay()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

required, fix clock dependencies

@iseeberg79
Copy link
Contributor Author

iseeberg79 commented Jan 10, 2026

@andig PR consists of two parts, one fixes a missing sorting and adresses the issue directly - the second parts features overlapping, etc.. Commented them to mark required changes; others enhance robustness. Perhaps slit the PR in fix and features, wdyt.

@github-actions github-actions bot added the stale Outdated and ready to close label Jan 17, 2026
@andig andig removed the stale Outdated and ready to close label Jan 18, 2026
@github-actions github-actions bot added the stale Outdated and ready to close label Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request stale Outdated and ready to close tariffs Specific tariff support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add charges / gridfee to grid type "fixed" / §14 Modul 3

3 participants