Skip to content

docs: align README, CODE_STYLE and CLAUDE.md with the actual codebase - #71

Merged
roquerodrigo merged 1 commit into
mainfrom
docs/align-with-codebase
Aug 7, 2026
Merged

docs: align README, CODE_STYLE and CLAUDE.md with the actual codebase#71
roquerodrigo merged 1 commit into
mainfrom
docs/align-with-codebase

Conversation

@roquerodrigo

Copy link
Copy Markdown
Owner

Summary

The docs had drifted from the code in several places and were actively misleading:

  • README entities: claimed "three entities" and omitted the connectivity binary sensor; the event entity was described with lock_state/record_id attributes that do not exist. The table now lists the four real entities and the event section documents the real attributes (record_type, battery, timestamp, uid, credential, key_id, accessory_battery) and event types, including the passcode-redaction rule for credential.
  • README layout: showed a flat data.py (real: data/ package, one class per file) and a TtlockBleOperationEvent class (real: TtlockBleLogEvent); binary_sensor.py was missing.
  • README CI: listed lint.yml/tests.yml/validate.yml, none of which exist — the real workflows are ci.yml (lint + tests + validate via the shared reusable workflows), codeql.yml, release.yml and auto-assign.yml.
  • CODE_STYLE.md: same stale class names in the naming examples, plus a reference to a config_flow._validate helper that never existed here (input validation lives in manual_key.async_validate); the pre-commit section now describes the local uv run hooks.
  • CLAUDE.md: the runtime dataclass field list was missing first_refresh, and the architecture sketch referenced LockEvent pushes instead of the LogEntry records the event platform actually surfaces.

Documentation for the tooling described here lands with #69 (scripts/setup via uv, local pre-commit hooks); merge that one first.

No code changes.

The README undersold the integration (three entities, no binary
sensor) and announced event attributes, a flat data.py, a
TtlockBleOperationEvent class and lint/tests/validate workflows that
do not exist. The entity table now lists the four real entities and
the real log-event attributes, the layout matches the data/ package,
and the CI section describes ci.yml, codeql.yml, release.yml and
auto-assign.yml.

CODE_STYLE.md and CLAUDE.md drop the same stale names and a
config_flow._validate helper that never existed here, and describe
the local uv run pre-commit hooks.
@roquerodrigo
roquerodrigo merged commit af29a08 into main Aug 7, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant