There may be many flows like this, but i could not find one when searching and thought that it could be ok to share it i someone else want to use somting like it.
This will controll a Tesla charge current based on a max total kW (in my case 9kW, to stay under 10kW total power draw), power price (40% above avg this day) and a lower battery limit of 10% (Will ignore power price, but still stay within 9kW total power).
The price is given in NOK, not EUR (so no, we dont pay 2EUR/kWh in Norway )
I am also sharing to get feedback and to make it better
Apps used are:
Tibber Pulse (total power drawn)
Power by the hour
Tesla Smart Charger