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>
23 lines
514 B
Python
23 lines
514 B
Python
from datetime import datetime as datetime_sys
|
|
|
|
import voluptuous
|
|
|
|
|
|
def string(value):
|
|
if value is None:
|
|
raise voluptuous.Invalid("string value is None")
|
|
return str(value)
|
|
|
|
|
|
def datetime(value):
|
|
if isinstance(value, datetime_sys):
|
|
return value
|
|
try:
|
|
return datetime_sys.fromisoformat(value)
|
|
except (TypeError, ValueError) as err:
|
|
raise voluptuous.Invalid("invalid datetime") from err
|
|
|
|
|
|
def config_entry_only_config_schema(domain):
|
|
return lambda config: config
|