The per-child entity ids are derived from the child name by Home Assistant's real slugifier, which transliterates every script through unidecode; the hand-rolled Latin-only mirror in sensor.py dropped non-Latin characters instead (slugging 京子 to "unknown"), so the roster's slugs diverged from the actual entity ids and the party-board/strategy auto-discovery silently failed for non-Latin households. Use homeassistant.util.slugify at runtime, composing the registry's 64-character entity-id cap the roster needs (verified against HA 2024.6: slugify itself does not truncate; the entity registry truncates the full <domain>.<slug> id). Give the mock harness a faithful homeassistant.util.slugify stub — python-slugify's frozen legacy pipeline with unidecode, verified byte-for-byte against real python-slugify across Latin, Cyrillic, CJK and Greek name shapes — and cover the non-Latin resolution contract in tests (roster slug == the object id HA's entity-id derivation produces). Feature-review finding (P2): auto-discovery slug must match Home Assistant's real slugify.
33 lines
914 B
TOML
33 lines
914 B
TOML
[project]
|
|
name = "nestquest"
|
|
version = "0.5.0"
|
|
description = "NestQuest Home Assistant Integration"
|
|
readme = "README.md"
|
|
requires-python = ">=3.11"
|
|
dependencies = []
|
|
|
|
[dependency-groups]
|
|
# fastapi and uvicorn live in the DEV group only so the monorepo's test
|
|
# venv can exercise the API app (tests under tests/test_api_health.py).
|
|
# They are NOT runtime dependencies of the NestQuest HA integration.
|
|
# When the API deployable is packaged (Feature 17), its runtime
|
|
# dependencies — fastapi, uvicorn, and any others — MUST be declared in
|
|
# that deployable's own dependency manifest, not here.
|
|
dev = [
|
|
"fastapi>=0.115",
|
|
"httpx>=0.28",
|
|
"jinja2>=3",
|
|
"pyjwt[crypto]>=2.9",
|
|
"pytest>=8.0.0",
|
|
"pytest-asyncio>=0.24",
|
|
"pyyaml>=6",
|
|
"unidecode>=1.4.0",
|
|
"uvicorn>=0.30",
|
|
"voluptuous>=0.14",
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
pythonpath = ["."]
|
|
asyncio_mode = "auto"
|