Daheimladen: add mA current control (#21908)
This commit is contained in:
parent
30925be560
commit
60fded77c9
3 changed files with 11 additions and 2 deletions
|
|
@ -208,11 +208,19 @@ func (wb *DaheimLadenMB) Enable(enable bool) error {
|
|||
|
||||
// MaxCurrent implements the api.Charger interface
|
||||
func (wb *DaheimLadenMB) MaxCurrent(current int64) error {
|
||||
return wb.MaxCurrentMillis(float64(current))
|
||||
}
|
||||
|
||||
var _ api.ChargerEx = (*DaheimLadenMB)(nil)
|
||||
|
||||
// MaxCurrentMillis implements the api.ChargerEx interface
|
||||
func (wb *DaheimLadenMB) MaxCurrentMillis(current float64) error {
|
||||
if current < 6 {
|
||||
return fmt.Errorf("invalid current %d", current)
|
||||
return fmt.Errorf("invalid current %.1f", current)
|
||||
}
|
||||
|
||||
curr := uint16(current * 10)
|
||||
|
||||
err := wb.setCurrent(curr)
|
||||
if err == nil {
|
||||
wb.curr = curr
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ requirements:
|
|||
description:
|
||||
de: Die Wallbox muss über eine aktuelle Firmware mit Modbus-Unterstützung verfügen. In den Einstellungen muss "Nachladen" (Smart) bzw. "RSDA" (Touch) aktiviert sein
|
||||
en: Wallbox must be operated with a recent firmware including Modbus support. Furthermore, “Nachladen” (Smart) or “RSDA” (Touch) must be activated in settings.
|
||||
capabilities: ["mA"]
|
||||
params:
|
||||
- name: host
|
||||
- name: port
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ products:
|
|||
- brand: DaheimLaden
|
||||
description:
|
||||
generic: Pro
|
||||
capabilities: ["1p3p"]
|
||||
capabilities: ["1p3p", "mA"]
|
||||
params:
|
||||
- name: host
|
||||
- name: port
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue