chore: limit SocLimiter to devices providing Soc

This commit is contained in:
andig 2025-03-05 15:58:49 +01:00
parent 04223e501d
commit 8cb70a1cb7
3 changed files with 8 additions and 97 deletions

View file

@ -48,6 +48,7 @@ var a struct {
api.Battery
api.BatteryCapacity
api.BatteryController
api.SocLimiter
}
func typ(i any) string {
@ -58,7 +59,7 @@ var dependents = map[string][]string{
typ(&a.Meter): {typ(&a.MeterEnergy), typ(&a.PhaseCurrents), typ(&a.PhaseVoltages), typ(&a.PhasePowers), typ(&a.MaxACPowerGetter)},
typ(&a.PhaseCurrents): {typ(&a.PhasePowers)}, // phase powers are only used to determine currents sign
typ(&a.PhaseSwitcher): {typ(&a.PhaseGetter)},
typ(&a.Battery): {typ(&a.BatteryCapacity), typ(&a.BatteryController)},
typ(&a.Battery): {typ(&a.BatteryCapacity), typ(&a.BatteryController), typ(&a.SocLimiter)},
}
// hasIntersection returns if the slices intersect