Add Baby Tracker client and Home Assistant integration

Python client for the Baby Tracker sync server, reverse engineered from
the Android app (4.53), and a HACS-installable Home Assistant integration
built on it. Each baby gets a log calendar and summary sensors, and actions
add entries that sync back to the group.

Reading has been run against the real server. Uploading and running inside
real Home Assistant have not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
arneandClaude Opus 5.5 committed 2026-11-04 10:04:39 +00:00
commit 6466f002e0
51 files changed
+5199

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
"""Makes ``import babytracker_api`` work without Home Assistant.
The library is loaded by path because the integration folder holds a calendar.py,
which would hide Python's own calendar module if that folder were on sys.path.
"""
import importlib.util
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
LIBRARY = ROOT / "custom_components" / "babytracker" / "babytracker_api"
if "babytracker_api" not in sys.modules:
spec = importlib.util.spec_from_file_location(
"babytracker_api", LIBRARY / "__init__.py", submodule_search_locations=[str(LIBRARY)]
)
module = importlib.util.module_from_spec(spec)
sys.modules["babytracker_api"] = module
spec.loader.exec_module(module)