Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
joehil committed Mar 10, 2024
1 parent 9762df2 commit 0c2d0b3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tibber2mqtt.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ func getTibberPricesNew() {
var m2 float64 = 0

var prices []float64
var today [30]float64
var today [24]float64
var tomorrow [24]float64
var n []float64
var t [24]float64
Expand Down Expand Up @@ -388,7 +388,8 @@ func getTibberPricesNew() {
tomorrow[ind] = val
ftomorrow += val
ctomorrow++
} else {
}
if strings.Contains(i.Path(), "today") {
ind, _ := strconv.Atoi(i.Value()[11:13])
val, _ := strconv.ParseFloat(total, 64)
today[ind] = val
Expand Down Expand Up @@ -424,7 +425,7 @@ func getTibberPricesNew() {

pricest := SortASC(prices)
for i := 1; i < 24; i++ {
t[i] = pricest[i]
t[i] = pricest[i-1]
}

json = "{"
Expand Down

0 comments on commit 0c2d0b3

Please sign in to comment.