# Condition

> A check an automation or script does before it continues, like whether someone is home.

Source: https://contributors.home-assistant.io/glossary/condition/

- In code: `conditions`
- Also: conditions

An automation only performs its actions when all its conditions pass. In a script, a condition that fails stops the script at that point.

## Related terms

- [Automation](https://contributors.home-assistant.io/glossary/automation/): A rule that performs actions when a trigger happens and its conditions are met, like turning on the lights at sunset when someone is home.
- [Trigger](https://contributors.home-assistant.io/glossary/trigger/): What starts an automation, like a state change, a time, or an event.
- [Script](https://contributors.home-assistant.io/glossary/script/): A named sequence of actions that can run from an automation, a dashboard, or by voice.
