RCT: fix battery charge (#18662)
This commit is contained in:
parent
07fb01d28c
commit
7e8e182425
1 changed files with 4 additions and 0 deletions
|
|
@ -145,6 +145,10 @@ func NewRCT(uri, usage string, minSoc, maxSoc int, cache time.Duration, capacity
|
|||
return m.conn.Write(rct.BatterySoCTargetMin, m.floatVal(float32(maxSoc)/100))
|
||||
|
||||
case api.BatteryCharge:
|
||||
if err := m.conn.Write(rct.PowerMngUseGridPowerEnable, []byte{1}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := m.conn.Write(rct.PowerMngBatteryPowerExternW, m.floatVal(float32(-10_000))); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue