Speedtest changed setup: how to scan at 0,6,12 18 hours

HI,
after updating to 94.4, I suddenly see that integration speedtest should be configured with speedtestdotnet: and no longer with - platform: speedtest

before I had it setup with

  - platform: speedtest
    minute: 30
    hour:
      - 0
      - 6
      - 12
      - 18
    monitored_conditions:
      - ping
      - download
      - upload

and would love to get the current scan_interval with the same frequency, but can’t find the correct syntax, given the fact that is now should be done with:

scan_interval:
  # At least one of these must be specified:
  days: 0
  hours: 0
  minutes: 3
  seconds: 30
  milliseconds: 0

using this for now, which is a valid config, but I need the hours.

## https://www.home-assistant.io/components/speedtestdotnet/
speedtestdotnet:
  scan_interval:
    minutes: 30
    hours: 2
  monitored_conditions:
    - ping
    - download
    - upload

please help me find the correct setting for that?
thanks!

The new configuration is a definite step backwards. You can now only specify an interval not specific times.

I find the easiest way to get the scan times I want is to set the component to manual update in the configuration.yaml:

speedtestdotnet:
  manual: True

And use an automation with a time pattern trigger and condition to get the scan times I want (hourly during peak hours):

- id: speedtest_peak_time_check
  alias: 'Speedtest Peak Time Check'
  trigger:
    platform: time_pattern # at two minutes past the hour
    minutes: 2
  condition:
    condition: time # between 6pm and midnight.
    after: '18:00:00'
    before: '23:10:00'
  action:
    service: speedtestdotnet.speedtest

If I understand your post correctly you want to scan at 00:30, 06:30, 12:30 and 18:30. If you are happy for that to happen at any six hour interval you could just specify:

speedtestdotnet:
  scan_interval:
    hours: 6
  monitored_conditions:
    - ping
    - download
    - upload

If you want it to happen at the specific times, use manual mode and an automation with time triggers.

1 Like

thanks!
I am still a it puzzled about the interval settings. Does my setting

  scan_interval:
    minutes: 30
    hours: 2

mean it scans each 2 and a half hours, or each 30 minutes and each 2 hours (which would be silly and I should then take out the minutes: 30)?

iow, are these interval settings added, or treated individually.

cool idea to have an automation take care of it, good tip!

It’s equivalent to:

  scan_interval: '02:30:00'

thanks. I should probably mimic the

    hour:
      - 0
      - 6
      - 12
      - 18

with the automation you suggested and have these set as triggers: time so . Not so bad, still yet another ‘deprecation’ while updating HA…there must have been an architectural decision behind this.

1 Like