# Event

> A message on the event bus that something happened, like a state change or a button press. Any code can listen to events.

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

- In code: `hass.bus`, `EVENT_STATE_CHANGED`, `EventEntity`
- Also: events, event bus

Home Assistant fires events for many things: a state change, an action being performed, Home Assistant starting. Automations can trigger on them.

Not to be confused with event entities: entities of the `event` type, which show the last thing that happened on a device, like a button press.

## Related terms

- [State machine](https://contributors.home-assistant.io/glossary/state-machine/): The part of Home Assistant Core that holds the current state of every entity.
- [Trigger](https://contributors.home-assistant.io/glossary/trigger/): What starts an automation, like a state change, a time, or an event.
- [The hass object](https://contributors.home-assistant.io/glossary/hass/): The `HomeAssistant` instance that integrations get, with access to the state machine, the event bus, actions, and the configuration.
