Number.set_value error

I am trying to setup and automation that sets the value of solis_timed_charge_start_hours to the value from sensor.charge_start_time

service: number.set_value
data_template:
  value: = {{ states('sensor.charge_start_time')}}
target:
  entity_id: number.solis_timed_charge_start_hours

But I get this error when I try to run the action:

image

Can anyone point me in the right direction?


service: number.set_value
data:
  value: "{{ states('sensor.charge_start_time') | float(0) }}"
target:
  entity_id: number.solis_timed_charge_start_hours

Thankyou so much!