Speedtest with own interval is not working

I am currently using my own automation to run the speed test every 6 hours.
With the default settings everything worked wonderfully. However, now I often get this error

Integration

Logger: homeassistant.components.speedtestdotnet.coordinator
Source: helpers/update_coordinator.py:237
Integration: Speedtest.net ([documentation](https://www.home-assistant.io/integrations/speedtestdotnet), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+speedtestdotnet%22))
First occurred: 00:00:01 (1 occurrences)
Last logged: 00:00:01

Error fetching speedtestdotnet data: Unable to connect to servers to test latency.

Automation:

- id: '1684486843121'
  alias: Speedtest
  description: ''
  trigger:
  - platform: time_pattern
    hours: /6
  condition: []
  action:
  - service: script.speedtest
    data: {}
  mode: single

Script:

speedtest:
  alias: Speedtest
  sequence:
  - service: homeassistant.update_entity
    data: {}
    target:
      entity_id:
      - sensor.speedtest_download
      - sensor.speedtest_ping
      - sensor.speedtest_upload
  mode: single

Is something wrong?

It’s a known issue that speed tests “on the hour” tend to fail.
Just add a random delay, e.g.

- id: 'ce0e40ef-74f5-487b-899d-1ab66f2e0fd7'
  alias: 'Update speedtest'
  mode: restart
  trigger:
    - platform: time_pattern
      hours: "/3"
  action:
    - delay: "00:06:14"
    - service: homeassistant.update_entity
      target:
        entity_id: sensor.speedtest_download

1 Like

Oh ok . Did I miss that in the documentation?
I will try that thanks