Speedtest.net sensor reset before a speed test

off top of head

why set to 0 it get over written each time

as it a sensor you need to change the state of it so

Continuing the discussion from How to manually set state/value of sensor?:

the action wood be

  action:
  - service: python_script.set_state
    data_template:
      entity_id: sensor.speedtest_download
      state: '0'
  - service: python_script.set_state
    data_template:
      entity_id: sensor.speedtest_ping
      state: '0'
  - service: python_script.set_state
    data_template:
      entity_id: sensor.speedtest_source
      state: 'Speed test set to 0'

not been tested but should work as the logic is right.