Octopus agile - turn on/off car charging

I am on Octopus Agile and an electric car, I have got so far with automating the car to start charging when the half hourly rate is below a certain amount, I am after a bit of guidance to get me over the finishing line.

I have setup the octopus integration

I have a helper set with a number that I want to trigger a charge if it goes below = input_number.input_number_kwh_charge_range.

The current agile rate is = sensor.current_kwh_price

I also have the car integration and the correct service for stop/start charging.

I want the end result to be when i plug in the charger, if my set threshold is below the current rate then a command to stop the service is sent or nothing happens.

If my threshold is above the current rate then a command to charge is sent to the service.

Also, as I am doing this via the car, when I plug in the charger, it starts charging automatically, I want this to stop if the current rate is over the threshold.

Here is the yaml I have so far, I am a beginner at this and getting myself in a muddle, any help will be appreciated

alias: Charge
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.current_kwh_price
    above: input_number.input_number_kwh_charge_range
  - platform: numeric_state
    entity_id:
      - sensor.current_kwh_price
    below: input_number.input_number_kwh_charge_range
  - platform: state
    entity_id:
      - input_number.input_number_kwh_charge_range
condition:
  - condition: state
    entity_id: binary_sensor.ioniq_5_ev_battery_charge
    state: "on"
action:
  - if:
      - condition: numeric_state
        entity_id: sensor.current_kwh_price
        below: input_number.input_number_kwh_charge_range
    then:
      - service: kia_uvo.start_charge
        data:
          device_id: 78690a63a4f5e932517df05353e3b539
  - if:
      - condition: numeric_state
        entity_id: sensor.current_kwh_price
        above: input_number.input_number_kwh_charge_range
    then:
      - service: kia_uvo.stop_charge
        data:
          device_id: 78690a63a4f5e932517df05353e3b539
mode: single