Tariffs: add outdoor temperature type and OpenMeteo (#27780)

Co-authored-by: Michael Geers <michael@geers.tv>
This commit is contained in:
Daniel Martin 2026-07-17 14:54:56 +02:00 • committed by GitHub
parent 68db0b7727
commit d68e5e5809
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 449 additions and 135 deletions

View file

@ -562,7 +562,7 @@ func cleanupTariffRef(name string) {
return
}
for _, ref := range []*string{&refs.Grid, &refs.FeedIn, &refs.Co2, &refs.Planner} {
for _, ref := range []*string{&refs.Grid, &refs.FeedIn, &refs.Co2, &refs.Planner, &refs.Temperature} {
if *ref == name {
*ref = ""
}

View file

@ -470,6 +470,9 @@ func testInstance(ctx context.Context, instance any) map[string]testResult {
case api.TariffTypeSolar:
valueKey = "power"
ratesKey = "solarRates"
case api.TariffTypeTemperature:
valueKey = "outdoorTemp"
ratesKey = "temperatureRates"
default:
valueKey = "price"
}