Tibber: fix formula not used

This commit is contained in:
andig 2025-10-24 11:35:36 +02:00
parent 57ac601cc0
commit 439bb308ef

View file

@ -110,7 +110,7 @@ func (t *Tibber) rates(pi []tibber.Price) api.Rates {
data := make(api.Rates, 0, len(pi))
for _, r := range pi {
price := r.Total
if t.Charges != 0 || t.Tax != 0 {
if t.Charges != 0 || t.Tax != 0 || t.Formula != "" {
price = t.totalPrice(r.Energy, r.StartsAt)
}
ar := api.Rate{