Help with automation repeated each hours

Hi there !
I want to execute a Shell Command each Hours.
I don’t find how to do it on automation…

I created shell command on Configuration.yaml

shell_command:
    mesure_forced: mosquitto_pub -h *my_ip_address* -p *port* -m '' -t 'blueriiot/commands/release_last_unprocessed/ID' -u '*user*' -P '*password*'

But don’t know how to add it on automation and repeat it each hours

Regards

Look at the trigger documentation. This one in particular: https://www.home-assistant.io/docs/automation/trigger/#time-pattern-trigger

Ok for triggering.
Regarding using ssh on automation ?
I don’t know how to implement it

Something like:

trigger:
  - platform: time_pattern
    hours: /1
condition: []
action:
  - service: shell_command.mesure_forced
    data: {}
mode: single
1 Like

Thanks for example :+1:

I have this error message

Mesure piscine use unknown service
The automation “Mesure piscine” (automation.automation_3) has an action that calls an unknown service: shell_command.mesure_forced.

Here is step details
image

Did you restart home assistant after creating your shell command?

Is the service available in Developer Tools → Services?

I just restarted HA and now it’s working :+1:
Thanks for your help tom_I