How blakeblackshear/frigate-hass-integration works
This is a Home Assistant custom integration for Frigate, a network video recorder. The principal workflow is to configure a Frigate instance, connect through the integration’s API client, and expose Frigate data and controls as Home Assistant entities and services. Users can also browse event and recording media, access camera streams and snapshots, and receive event/review updates over WebSocket. The README documents these product capabilities; some platform implementations were not excerpted, so their internal call paths are not expanded here.
Main entry points: __init__.py Integration runtime · api.py Frigate API client · media_source.py Media browser · ws_api.py WebSocket API
Components 20
Setup and runtime
- Integration runtime
custom_components/frigate/__init__.py - Config flow
custom_components/frigate/config_flow.py - Frigate API client
custom_components/frigate/api.py - Diagnostics
custom_components/frigate/diagnostics.py
Home Assistant entities
- Camera entities
custom_components/frigate/camera.py - Sensor entities
custom_components/frigate/sensor.py - Motion sensors
custom_components/frigate/binary_sensor.py - Control entities
custom_components/frigate/switch.py - Other entities
custom_components/frigate/number.py - Image entities
custom_components/frigate/image.py - Update entity
custom_components/frigate/update.py
Media and views
- Media browser
custom_components/frigate/media_source.py - HTTP views
custom_components/frigate/views.py
Realtime and AI
- WebSocket API
custom_components/frigate/ws_api.py - MQTT WebSocket proxy
custom_components/frigate/ws_proxy.py - LLM functions
custom_components/frigate/llm_functions.py
Other components
- Home Assistant user
- Home Assistant
- Frigate server
- MQTT broker
Connections 25
- Home Assistant user → Home Assistant: configures
README.md - Home Assistant → Config flow: starts setup
- Config flow → Frigate API client: configures
custom_components/frigate/config_flow.py - Integration runtime → Frigate API client: creates client
custom_components/frigate/__init__.py - Frigate API client → Frigate server: HTTP requests
custom_components/frigate/api.py - Home Assistant → Integration runtime: loads integration
- Integration runtime → Camera entities: sets up platform
custom_components/frigate/camera.py - Integration runtime → Sensor entities: sets up platform
custom_components/frigate/sensor.py - Integration runtime → Motion sensors: sets up platform
custom_components/frigate/binary_sensor.py - Integration runtime → Control entities: sets up platform
custom_components/frigate/switch.py - Integration runtime → Other entities: sets up platform
custom_components/frigate/number.py - Integration runtime → Image entities: sets up platform
custom_components/frigate/image.py - Integration runtime → Update entity: sets up platform
custom_components/frigate/update.py - Camera entities → Frigate API client: requests camera data
custom_components/frigate/camera.py - Media browser → Frigate API client: fetches media data
custom_components/frigate/media_source.py - Home Assistant → Media browser: browses media
README.md - Media browser → HTTP views: uses media routes
custom_components/frigate/media_source.py - Home Assistant → WebSocket API: sends commands
custom_components/frigate/ws_api.py - WebSocket API → Frigate API client: requests Frigate data
custom_components/frigate/ws_api.py - WebSocket API → MQTT WebSocket proxy: subscribes updates
custom_components/frigate/ws_api.py - MQTT WebSocket proxy → MQTT broker: subscribes topics
custom_components/frigate/ws_proxy.py - MQTT broker → MQTT WebSocket proxy: publishes events
custom_components/frigate/ws_proxy.py - LLM functions → Frigate API client: queries Frigate
custom_components/frigate/llm_functions.py - Home Assistant → LLM functions: invokes tools
- Home Assistant → Diagnostics: requests diagnostics