No description
Find a file
jm 2bc7db6e75 Document repo; add GitHub backup mirror via origin dual push URL
Rewrite the stale scratch README into a project README (what the repo is,
token/deploy usage, remotes). Configure origin with a second push URL so a
single 'git push' mirrors to Forgejo and the new GitHub backup at
git@github.com:jmtremblay2/home-assistant.git.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 22:14:30 -04:00
automations Add TOU winter peak-shaving; parameterize by season (v3) 2026-07-09 22:04:16 -04:00
.gitignore Import live AC automations (v1 baseline) 2026-07-09 21:01:08 -04:00
AUTOMATIONS.md Add TOU winter peak-shaving; parameterize by season (v3) 2026-07-09 22:04:16 -04:00
deploy.py Import live AC automations (v1 baseline) 2026-07-09 21:01:08 -04:00
README.md Document repo; add GitHub backup mirror via origin dual push URL 2026-07-09 22:14:30 -04:00

home-assistant

Source of truth for the Home Assistant automations on the HA server at 192.168.128.3:8123. The automations live in automations/ as YAML and are deployed to HA over its REST config API with deploy.py. HA is only a deploy target — it never reads these files directly. See AUTOMATIONS.md for the full spec (identity model, per-rule behavior, failure modes, changelog).

Access

The HA API token is read from the shell environment:

source ~/.bashrc        # exports HA_API_KEY

The README's original pass show home-assistant/192.168.128.3/jm/api route works interactively but requires a YubiKey touch and times out in non-interactive shells, so HA_API_KEY in ~/.bashrc is the practical source.

Deploy

source ~/.bashrc
python3 deploy.py --check     # parse only
python3 deploy.py             # deploy all automations/*.yaml in place (by id)

Remotes

Name URL Role
origin ssh://forgejo@forgejo.jmopines.com:2222/jm/home-assistant.git primary (fetch + push)
backup git@github.com:jmtremblay2/home-assistant.git GitHub backup mirror (push only)

origin is configured with two push URLs, so a plain git push mirrors to both Forgejo and GitHub in one command — the GitHub backup stays current automatically. Fetches still come only from Forgejo.

git push                  # -> Forgejo AND GitHub (backup) together

The separate backup remote is kept for explicit/manual use (e.g. git fetch backup). To inspect the push targets: git remote -v. This auto-mirror is a local git config (remote.origin.pushurl), not stored in the repo, so it must be re-added after a fresh clone:

git remote set-url --add --push origin ssh://forgejo@forgejo.jmopines.com:2222/jm/home-assistant.git
git remote set-url --add --push origin git@github.com:jmtremblay2/home-assistant.git