Introduction

A script is a sequence of actions that takes place when the script is activated. When turned on, they run through their sequence of actions, then turn themselves off.

Create a Script

Navigate to the Script Editor. Configuration -> Scripts Click the + on the right bottom of the screen.

Give your script a name. Add actions. You can add as many as you want. This example will turn off all of the devices, so each device/entity and action is added separately. Save your changes.

Execute Your Script

You can test your new script from the Script Editor window by pressing the play button. If it doesn’t work the way you wanted to you can always make changes.

Add Script to Lovelace UI

Open the Configure UI, which was covered in Organize and Customize Home Assistant.

Click the + in the bottom corner to add a new card. Your script can be added to an Entities card. Title the card and add your script.

Save and exit the UI editing mode.

Conclusion

Scripts are easy to build and add a lot of functionality to your smart home.

Extra Help