home-assistant /

Home Assistant

Live map
Snapshotdev · 87c1a28

An event-driven runtime loads integrations, normalizes devices into entities, exposes live state to the UI, runs automations, and records history.

Click a building or route
Choose a path

An authenticated WebSocket command calls a service; entity state changes return live and are recorded.

System map8 components · 10 connections
130%
Home Assistant Core: device signals become state and automation architectureFollow either a UI service call inward or an MQTT device update inward; both meet at the core state, event, and service buses.entity_id, state, attr…authenticated command …result/error messages …state and event rows q…historical states, sta…Runner andbootstrapIntegrationloaderCore busesEntityplatformsWebSocket APIAutomationengineMQTTintegrationRecorderdatabase
Connections
BuildingsEntryServiceComputeStorageRuntimeToolingExternal

Terms, in plain English

IntegrationA package that connects Home Assistant to a device family, protocol, or service.

How to study this repo

  1. 1
    Meet the three core buses

    Read core.py and distinguish the EventBus, StateMachine, and ServiceRegistry responsibilities.

  2. 2
    Trace an integration

    Follow MQTT setup through an MQTT entity update and note where protocol-specific data becomes generic state.

  3. 3
    Follow causality

    Trace a state_changed event into automation actions, WebSocket subscribers, and Recorder while watching context IDs.