Scripts in Home Assistant
Scripts in Home Assistant let you group a series of actions together, so you can run them all at once with a single tap, voice command, or automation. If you want to turn off all your lights, send a notification, and play some music as part of a bedtime routine - or trigger any set of tasks in a specific order - a script is the way to do it. A script is simply a list of actions that run in sequence, just like a recipe. Each action in a script can do something like turn on a device, adjust a setting, call another script, or even pause for a certain amount of time. You can reuse scripts anywhere - run them from the dashboard, call them from automations, or activate them with voice assistants. Automations are triggered by something happening (like a sensor detecting movement or a certain time of day). Scripts don't trigger on their own - they only run when you call them. Think of automations as "if this happens, do that," and scripts as "do this set of things when I tell you." You can create scripts using the visual editor in Home Assistant, found under Settings > Automations & Scenes > Scripts. The editor lets you add actions one by one, adjust their order, and configure any details. Each script needs a name and can be given an icon and description to make it easy to find later. What is a Script?
Common Use Cases
How are Scripts Different from Automations?
Creating a Script
Tips & Best Practices
What Can You Put in a Script?
Ready to try it? Head to the Scripts section in Home Assistant and create your first routine!