Run speedtest.net each hour

Hello,

I’ve installed the speedtest.net integration and as a test I would like to run it every hour.

So, with the help of Speedtest.net - Home Assistant, i tried this configuration

alias: SpeedTest each hour
triggers:
  - trigger: event
    platform: time_pattern
      hours: /1
      minuts: 0
conditions: []
actions:
  - action: homeassistant.update_entity
    metadata: {}
    data:
      entity_id:
        - sensor.speedtest_download
        - sensor.speedtest_upload
        - sensor.speedtest_ping
mode: single

But when I want to save it, I got this error : “Message malformed: extra keys not allowed @ data[‘hours’]”.

What do I do wrong?

And this also doesn’t work at all…

alias: Speedtest every 1 hour
description: Speedtest every 1 hour
triggers:
  - trigger: time_pattern
    hours: "1"
    minutes: "00"
    seconds: "00"
conditions: []
actions:
  - action: homeassistant.update_entity
    metadata: {}
    data:
      entity_id:
        - sensor.speedtest_download
        - sensor.speedtest_upload
        - sensor.speedtest_ping
mode: single

What you have set up with

triggers:
  - trigger: time_pattern
    hours: "1"
    minuts: "00"

had a typo in it - “minuts” instead of “minutes”.

The 2nd one only runs once a day at 1 o’clock.

Try

triggers:
  - trigger: time_pattern
    hours: /1
    minutes: "00"
    seconds: "00"

in order to run it every hour.

I’m using the same integration, but never set up an automation - the documentation you’re referencing also says that "By default, a speed test will be run every hour. "

1 Like

There is an add-on which allows you to run speedtest from an automation at any interval you like - or indeed just once. It’s a bit more accurate too - allows you to select the server you’re testing with. You still need the speedtest integration.