Skip to content

Conversation

@naltatis
Copy link
Member

@naltatis naltatis commented Jan 14, 2026

Add form based configuration for tariffs and forecast to config ui.

πŸ’΅πŸƒβ˜€οΈπŸ•°οΈ make grid, feedin, co2, solar and planner tariffs ui configurable
πŸ‘› add fixed and fixed-zones tariff template. keeping separate to simplify standard setup use case
πŸ“ introduce zones param type to specify hour/day/month based prices
⚑ introduce pricePerKWh param to support currency specific input ct/kWh, rp/kWh, ...
πŸ“Š forecast visualization, using existing price chart
🚚 migration: no auto-migration, config via yaml (file or ui) still works, tariffs can be migrated one by one. only one source allowed per tariff type

TODOs

  • translations
  • type: static template (zones)
  • ui polish
  • add e2e tests
  • persistence and ref handling
  • migration behavior (parallel to yaml, lock ui if yaml exists)
  • cleanup initialization
  • refactor price chart data prep
  • global currency setting
  • ui for zones param

Screenshots
Bildschirmfoto 2026-01-15 um 13 10 38

Bildschirmfoto 2026-01-15 um 17 08 21 Bildschirmfoto 2026-01-15 um 15 59 36 Bildschirmfoto 2026-01-15 um 16 56 31 Bildschirmfoto 2026-01-15 um 15 58 54 Bildschirmfoto 2026-01-15 um 13 13 47 Bildschirmfoto 2026-01-15 um 13 11 21 Bildschirmfoto 2026-01-15 um 13 11 06 Bildschirmfoto 2026-01-15 um 13 11 01 Bildschirmfoto 2026-01-15 um 13 10 51
config.ui.tariff.webm

@naltatis naltatis added enhancement New feature or request ux User experience/ interface labels Jan 14, 2026
@andig
Copy link
Member

andig commented Jan 14, 2026

This will also simplify adding additional fees ;)

cmd/setup.go Outdated
}

// Track which types are configured via YAML
yamlConfigured := make(map[api.TariffUsage]bool)
Copy link
Member

Choose a reason for hiding this comment

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

Das ist viel Code fΓΌr yaml. KΓΆnnen wir das einfach nicht tun, fΓΌr teil-yaml Setups keine weitere UnterstΓΌtzung anbieten?

})
}

// Load device-based tariffs
Copy link
Member

Choose a reason for hiding this comment

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

Wozu brauchts das? Die stehen in den tariffs.* Variablen doch schon drin?

var res TariffRefs
if err := settings.Json(keys.TariffRefs, &res); err != nil {
// return defaults if not configured
res = TariffRefs{Currency: "EUR", Solar: []string{}}
Copy link
Member

Choose a reason for hiding this comment

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

do this in line 24

// return defaults if not configured
res = TariffRefs{Currency: "EUR", Solar: []string{}}
}
if res.Solar == nil {
Copy link
Member

Choose a reason for hiding this comment

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

remove


// Validate and update tariff references
if payload.Grid != nil {
if *payload.Grid != "" {
Copy link
Member

Choose a reason for hiding this comment

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

does this make sense? Either ignore in the first place or error. Loops instead of duplicated code?

@naltatis
Copy link
Member Author

Zones UI (work in progress)

Bildschirmfoto 2026-01-19 um 17 49 47 Bildschirmfoto 2026-01-19 um 17 49 54

@naltatis
Copy link
Member Author

Here the working ui for the new type: zones param type.

Bildschirmaufnahme.2026-01-19.um.20.18.53.webm

@naltatis
Copy link
Member Author

Add UI for currency configuration:

Bildschirmfoto 2026-01-22 um 17 03 52 Bildschirmfoto 2026-01-22 um 17 03 55 Bildschirmfoto 2026-01-22 um 17 05 13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ux User experience/ interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants