Skip to content

Commit

Permalink
fix: lowercase charging_state string
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasehlert committed Jun 19, 2024
1 parent be9062a commit de6f21c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/v1_TeslaMateAPICarsStatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"log"
"net/http"
"net/url"
"strings"
"sync"
"time"

Expand Down Expand Up @@ -324,7 +325,7 @@ func (s *statusCache) newMessage(c mqtt.Client, msg mqtt.Message) {
case "plugged_in":
stat.MQTTDataPluggedIn = convertStringToBool(string(msg.Payload()))
case "charging_state":
stat.MQTTDataChargingState = string(msg.Payload())
stat.MQTTDataChargingState = strings.ToLower(string(msg.Payload()))
case "charge_energy_added":
stat.MQTTDataChargeEnergyAdded = convertStringToFloat(string(msg.Payload()))
case "charge_limit_soc":
Expand Down

0 comments on commit de6f21c

Please sign in to comment.