Fix mqtt topic spelling for minSoC and targetSoC (#616)
This commit is contained in:
parent
c3c18a588d
commit
b85c8b3f05
2 changed files with 3 additions and 2 deletions
|
|
@ -503,6 +503,7 @@ The MQTT API follows the REST API's structure, with loadpoint ids starting at `0
|
|||
- `evcc/loadpoints`: number of available loadpoints
|
||||
- `evcc/loadpoints/<id>`: loadpoint dynamic state
|
||||
- `evcc/loadpoints/<id>/mode`: loadpoint charge mode (writable)
|
||||
- `evcc/loadpoints/<id>/minSoC`: loadpoint minimum SoC (writable)
|
||||
- `evcc/loadpoints/<id>/targetSoC`: loadpoint target SoC (writable)
|
||||
|
||||
Note: to modify writable settings append `/set` to the topic for writing.
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue