Fix mqtt topic spelling for minSoC and targetSoC (#616)

This commit is contained in:
andig 2021-01-26 10:38:29 +01:00 • committed by GitHub
parent c3c18a588d
commit b85c8b3f05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -72,13 +72,13 @@ func (m *MQTT) listenSetters(topic string, apiHandler core.LoadPointAPI) {
m.Handler.Listen(topic+"/mode/set", func(payload string) {
apiHandler.SetMode(api.ChargeMode(payload))
})
m.Handler.Listen(topic+"/minsoc/set", func(payload string) {
m.Handler.Listen(topic+"/minSoC/set", func(payload string) {
soc, err := strconv.Atoi(payload)
if err == nil {
_ = apiHandler.SetMinSoC(soc)
}
})
m.Handler.Listen(topic+"/targetsoc/set", func(payload string) {
m.Handler.Listen(topic+"/targetSoC/set", func(payload string) {
soc, err := strconv.Atoi(payload)
if err == nil {
_ = apiHandler.SetTargetSoC(soc)