How to set sensor value based upon virtual switch status

Please could someone help out a new boy?

I’m looking to create a virtual switch that will allow me to toggle the £/kWh so that I can use that entity in my energy screen.

So, if the switch is off, the entity should use the values from sensor.octopus_energy_electricity_current_rate but when it’s turned on it should set to a fixed £0.075/kWh rate.

That way, I can override the rate at which I am charged electricity when I Octopus energy set my car chargin on the cheaper EV rate which happens outside of the sensor.octopus_energy_electricity_current_rate data that i’m fetching…