Bi-directional socket for Solar battery

Hi there I have a solar battery that also allows storing energy from the usual 230V outlet to use it with a dynamic tariff in the winter when it isn’t needed for solar.

Now I am searching for a power socket (zigbee would be preferred) which detects the direction of the current. I currently have a Nous A1Z installed which does correctly display the wattage, but no matter if the battery is loading or unloading it has a positive amount. Is there a socket that also reports the direction?

Might be better off with a CT clamp for this functionality.

Neil is right and I am afraid you’ll be looking for the right solution for a while. I have been looking at off the shelf products but there is always something not working/reporting in HA. The best change I think is an ESP32+HSTS01L+HA-voltage sensor solution but I could not get the YAML to work properly yet. Maybe someone got that working ??!!