I'm just wondering since you subtract the energy directly in the script instead of changing the official energy usage on the building, does this not show up on the vanilla energy usage charts? As in, it will show that the roboports are using less than they actually are with this mod.
Since each second the roboport has a chunk of it's accumulator energy removed, it needs to recharge. When it does, it uses power from the grid and that is handled the same as any other powered structure, so yes it shows on the charts.