ha-architecture
Installation
SKILL.md
Home Assistant Core Architecture
Home Assistant runs on a single-threaded asyncio event loop. All code shares this loop — blocking it freezes automations, the UI, and entity updates.
The hass Object
Every integration receives HomeAssistant instance (hass) — the central hub for all core systems:
from homeassistant.core import HomeAssistant
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
# hass.bus — Event bus for pub/sub communication
# hass.states — State machine for entity states
# hass.services — Service registry for actions
# hass.config — System config (location, units, timezone)
...