Yeah, I guess so. The good part here is that the different battery modes can be achieved with only a handful primitives:
Battery discharging allowed: true / false
Battery charging from grid allowed: true / false
(for forcing the export to grid, I would also need force discharging: true / false)
Do you do this so that you monitor the SoC and control when charging from PV (or grid) will be stopped i.e. even if the battery would have a built-in mechanism for this, you override it and control it from openHAB? Kinda makes sense if you take over the whole management instead of adding an EMS layer on top of another layer…