How do I minimizie cost for EV charging?

I want to find a charging schedule that minimize cost of charging an EV.

The main objective is to have a fully charged car for the next morning, but the sub objective is to minimize cost based these two things combined:

1. Charge when electricity is cheapest - I know the hourly electricity price for the next 24 hours
2. Minimize hourly peak demand charges for the household - I pay a small additional fee each month if my hourly demand exceed different steps.

I know the power size of the charger (W), the capacity of the car battery (Wh), how many hours I have to charge (h), I know what my household peak is right now (W), and all prices for both consumption (Money/Wh) and peak demands (xx Money, if hourly demand > xxxx Wh).

• What would one call this type of problem?
• How would one go forward to solve this?
• Is there a python package that can help me solve this? (I have seen similar problems been solved with Gurobi)