Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
39be85c
docs: add Home Assistant integration brainstorm
claude Feb 1, 2026
814142d
docs: add detailed Home Assistant implementation plan
claude Feb 1, 2026
5dafb63
docs: update HA plan and brainstorm
lan17 Feb 1, 2026
2915200
docs: refine HA plan and brainstorm
lan17 Feb 2, 2026
aaeefd0
docs: add bundled PostgreSQL and HA Events API to integration plan
lan17 Feb 2, 2026
e28fb3d
docs: improve HA integration plan for LLM implementability
lan17 Feb 2, 2026
acf22d3
docs: fix repository.json location and add-on URL format
lan17 Feb 2, 2026
50c0dbb
Merge branch 'main' of github.com:lan17/homesec into claude/homesec-h…
lan17 Feb 2, 2026
cb4a093
docs: align HA integration plan with plugin config boundary refactor
lan17 Feb 2, 2026
948a740
docs: comprehensive review - fix bugs, simplify v1 scope
lan17 Feb 2, 2026
916ff20
docs: split HA integration plan into per-phase documents
lan17 Feb 2, 2026
31b8a2d
docs: fix Phase 0 and Phase 1 for implementation readiness
lan17 Feb 2, 2026
1de4a2d
docs: fix Phase 0 overview - remove redundant item
lan17 Feb 2, 2026
aa2d6a3
update phase 0
lan17 Feb 2, 2026
121a3b9
docs: remove config_version optimistic concurrency for v1
lan17 Feb 2, 2026
56f9646
docs: remove recent_alerts sensor, add clip filters for alerts
lan17 Feb 2, 2026
225bcc7
docs: simplify HA integration plan for v1
lan17 Feb 2, 2026
dabeca1
docs: defer camera test endpoint to v2
lan17 Feb 2, 2026
fb0c3f8
docs: fix entity inconsistency and clarify list merge semantics
claude Feb 2, 2026
50d5f7e
docs: clean up API endpoint clarity
lan17 Feb 2, 2026
316524e
docs: clarify loader.py is extended, not replaced
lan17 Feb 2, 2026
13d6915
docs: address LLM review feedback - simplify architecture
lan17 Feb 2, 2026
50ddd40
docs: address second round of LLM review feedback
lan17 Feb 2, 2026
3db8cbd
docs: complete Phase 1 spec with missing response models and implemen…
lan17 Feb 2, 2026
a017533
docs: address final Phase 1 review feedback
lan17 Feb 2, 2026
5d072a6
docs: fix response models to match existing code
lan17 Feb 2, 2026
dbf27fb
Phase 1 implementation
lan17 Feb 2, 2026
69fd97b
Phase 2 implementation : add home assistant notifier
lan17 Feb 2, 2026
e170b06
Phase 3 implementation: Home Assistant add-on
lan17 Feb 2, 2026
46e299e
Phase 4 implementation: HA integration
lan17 Feb 4, 2026
013e058
docs: add Docker setup guide for HA Container users
claude Feb 4, 2026
2240308
Merge branch 'main' of github.com:lan17/homesec into claude/homesec-h…
lan17 Feb 4, 2026
42000d9
Merge branch 'main' of github.com:lan17/homesec into claude/homesec-h…
lan17 Feb 4, 2026
96db49e
WIP
lan17 Feb 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.14"

- name: Setup uv and Python
uses: astral-sh/setup-uv@v3
with:
Expand All @@ -46,13 +51,25 @@ jobs:
- name: Sync dependencies
run: uv sync --group dev

- name: Install shellcheck
run: sudo apt-get update && sudo apt-get install -y shellcheck

- name: Shellcheck add-on scripts
run: make -C homeassistant shellcheck

# Lint and typecheck run while Postgres boots
- name: Lint
run: make lint

- name: HA integration lint
run: make ha-lint

- name: Type check
run: make typecheck

- name: HA integration tests
run: make ha-test

# Wait for Postgres before migrations
- name: Wait for Postgres
run: |
Expand Down
18 changes: 16 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SHELL := /bin/bash
.SHELLFLAGS := -eu -o pipefail -c

.PHONY: help up down docker-build docker-push run db test coverage typecheck lint check db-migrate db-migration publish
.PHONY: help up down docker-build docker-push run db test coverage typecheck lint check db-migrate db-migration publish ha-lint ha-test

help:
@echo "Targets:"
Expand All @@ -20,6 +20,8 @@ help:
@echo " make typecheck Run mypy"
@echo " make lint Run ruff linter"
@echo " make check Run lint + typecheck + test"
@echo " make ha-lint Run ruff on HA integration code"
@echo " make ha-test Run HA integration tests"
@echo ""
@echo " Database:"
@echo " make db-migrate Run migrations"
Expand All @@ -34,6 +36,9 @@ HOMESEC_LOG_LEVEL ?= INFO
DOCKER_IMAGE ?= homesec
DOCKER_TAG ?= latest
DOCKERHUB_USER ?= $(shell echo $${DOCKERHUB_USER:-})
HA_INTEGRATION_DIR := homeassistant/integration
HA_INTEGRATION_SRC := $(HA_INTEGRATION_DIR)/custom_components
HA_INTEGRATION_TESTS := $(HA_INTEGRATION_DIR)/tests

# Docker
up:
Expand Down Expand Up @@ -77,12 +82,21 @@ typecheck:
lint:
uv run ruff check src tests
uv run ruff format --check src tests
make -C homeassistant shellcheck
make ha-lint

ha-lint:
uv run ruff check $(HA_INTEGRATION_SRC) $(HA_INTEGRATION_TESTS)
uv run ruff format --check $(HA_INTEGRATION_SRC) $(HA_INTEGRATION_TESTS)

ha-test:
uv run pytest $(HA_INTEGRATION_TESTS) -q

lint-fix:
uv run ruff check --fix src tests
uv run ruff format src tests

check: lint typecheck test
check: lint typecheck test ha-lint ha-test

# Database
db-migrate:
Expand Down
18 changes: 15 additions & 3 deletions config/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ notifiers:
qos: 1
retain: false

# Home Assistant Events API (recommended for HA users)
# - backend: home_assistant
# config:
# # When running as HA add-on, no configuration needed (uses SUPERVISOR_TOKEN)
# # For standalone mode, provide HA URL and token:
# # url_env: HA_URL # http://homeassistant.local:8123
# # token_env: HA_TOKEN # Long-lived access token from HA

# SendGrid email
# - backend: sendgrid_email
# config:
Expand Down Expand Up @@ -196,8 +204,12 @@ alert_policy:
# filter_workers: 4
# vlm_workers: 2

# Health check server
# health:
# FastAPI server
# server:
# enabled: true
# host: "0.0.0.0"
# port: 8080
# mqtt_is_critical: false
# cors_origins:
# - "*"
# auth_enabled: false
# api_key_env: "HOMESEC_API_KEY"
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
homesec:
build: .
image: leva/homesec:latest
image: leva/homesec:claude-homesec-home-assistant-integration-6kzkl
pull_policy: always
container_name: homesec
restart: unless-stopped
Expand Down
7 changes: 7 additions & 0 deletions docs/ha-phase-0-prerequisites.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Phase 0: Core Prerequisites

> **Note**: This phase has been merged into [Phase 1 (REST API)](./ha-phase-1-rest-api.md).
>
> The only prerequisite (`CameraConfig.enabled` field) is now part of Phase 1, section 1.1.1.

See [Phase 1](./ha-phase-1-rest-api.md) for implementation details.
Loading