Hi Patrik,
Sure there is.
Here is how i’ve done mine. And I’ll explain a bit, even if it is common knowledge for some, maybe it will help others to understand better how they can create their own automation.
-
Go to Configuration
-
Go to Automations.
-
Click on " + ADD AUTOMATION" button on the lower right corner
-
The automation wizard will appear.
I will break it into sections so it will be easy to explain.
You need to provide some information:
First section - Description and info:
- Give it a name, for example: “Night reboot”,
- Add a description, for example: “HA 4:00 AM reboot”
- Select a mode on how the automation will work - I recommend that you use “Single”
- And a switch to enable/disable that automation (in case you later want to stop using it but not delete it)
Second section - Triggers:
In this section you basically have the option to select what will “activate” (trigger) the automation.
In your case you will use Time as a trigger, at a specific time.
Nb: you can have multiple triggers for more advanced automation (for example, trigger this automation if the camera does not reply to ping for 30 seconds… but this will be more advanced)
Third Section - Conditions:
For now you can leave this without any conditions.
For future, you can add here conditions for this to run
Case: “Allow to run this automation only if the system has been up for at least 24h” In case you did a previous manual reboot that day, it will not require to reboot the host again
Fourth section - Actions
This is actually the section that you specify WHAT your automation will do based on the previous information.
In the Action Type, you need to select: “Call service” - this means that HA will try run a command that you will specify in the “Service” field
In your case it is a simple service call to reboot the host (can be a VM or a PC or a Pi etc) of your home assistant OS:
Here is the actual command that you need to add hassio.host_reboot
In the end it should be something like this picture:
For other types of automation you can select a different “Action type”, you can set a value, or add a delay etc…
For example you can set the lights to a specific value based on a specific time.
And after a delay, you can set them to another value (color or brightnes etc)
think of it like this
1 Action - turn the bedroom light on at 20 percent
2 Action - wait 30 minutes
3 Action - set the bedroom light at 50 percent
and so on and so on…
Hope this helps you and others.
And don’t hesitate to: read the docs / other people’s scripts / try yourself / ask here for help
Best regards
Bogdan