This topic has been discussed before but at that time the upstream pypi package did not support it, but now it does! This was last discussed in this topic: Wallbox Energy Price Sensor should be a Number · Issue #93614 · home-assistant/core · GitHub. Since then the package has added functionality for setEnergyCost(chargerId, energyCost) as discussed in the above issue.
Ping @hesselonline