Reboot pi from

Hi. Long story short is there any way I can automate rebooting my raspberry pi (the pi itself, not on a schedule using

So far I have found no solution: cron on the pi doesn’t work (or there is no true access to it when sshing to a pi running; there is no sudo in and it can’t be installed, so you can’t run a shell script to reboot; etc etc etc

does hassio host reboot work? If so, you should be able to add it to a script and add to an automation to fire it off.

Isn’t that only available from the command line?

Sorry, I wasn’t thinking straight.

You should be able to call the service hassio.host_reboot.

Awesome! Works! Thanks!

1 Like

@fezfox are you able to write this up if you came up with a solution?

yes I did:

- id: reboot_pi
  initial_state: true
  alias: 'Reboot pi daily'
  - platform: time
    at: '03:00:00'
  - service: hassio.host_reboot
1 Like

Apologies for resurrecting an older thread, but could you be more specific on how you implemented the solution described above? Did you add this in the configuration.yaml file?

Thanks… Fairly new to HA and a lot of the discussions are more than a little confusing since they are written by people who obviously know what they’re doing, while those of us who don’t (or barely) are struggling to learn. :slight_smile:

This is an automation. So you could

  1. include it directly in configurations.yaml, as above preceeded by automation:
  2. more typically, people put all their automations as above in a single filed called automations.yaml and refer to that file in configurations.yaml like this:
automation: !include automations.yaml
  1. In my case, I actually have an automations folder and that is in a file called system.yaml and every file in that folder is included with this line in configurations.yaml:
automation: !include_dir_merge_list automation/


add the above to your configrations.yaml file, indented after automations:


Thank you for the clarification! HomeAssistant can be rather daunting in the beginning. :thinking: