Pause Speedtest Component

Is it possible to pause the speedtest.net tests if for example my ps4 is online?
The problem is that speedtest uses all of my bandwidth.

You could tie it to an automation and an input switch.

ok do you know how?
Because if you initialize the component in the configuration-file it runs on the given times.

Thanks
Jacko

Old Post but this is how I did it. Hope it helps someone.

My Speed test runs every morning at 4am

  - platform: speedtest
monitored_conditions:
  - ping
  - download
  - upload
hour:
  - 4

I have an automation that calls the update service every hour as long as my smart TV is off.

- alias: 'Speed test disabled when TV is on'
  trigger:
    platform: time
    # You can also match on interval. This will match every 60 minutes
    minutes: '/60'
    seconds: 0
  condition:
    condition: state
    entity_id: device_tracker.livingroomtv
    state: 'not_home'
  action:
     service: sensor.update_speedtest
1 Like

@rabittn Do you know how to make sure the speedtest is disabled completely? I’ve came up with the same configuration as yours but would like to make the minutes==None. However when minutes: was left empty (None), the YAML parser complains. Is there a way to set that minutes back to None so the speedtest will be disabled by default?

What are you trying to accomplish?

Disable it completely. By default it runs each hour. How do you “unset” the minutes parameter?

I know that I can set the hour parameter but still it will run once a day.

If you don’t want to run it at all, why not just remove the lines from your config file. Or comment them out if you may want to run it in the future.

I could not figure out a way to disable it completely. So I settled for allowing it to run in the early morning automatically. Then I use the automation to run it as long as my tv isn’t on.

Same goal here - I want it only to run via the automation. 4 am is a good idea but still it happens people are watching streaming in strange hours :slight_smile:

You could add the day option and set it to 31.

Then it will only run 7 months out of the year. I did some hacking on the component to make it never run.

Perhaps @nkgilley could chime in with the best way to achieve a manual only config.

I just submitted a PR for this: https://github.com/home-assistant/home-assistant/pull/4906

With that you can add this to your configuration.yaml to disable scheduled speedtests.

  manual: True
2 Likes