hass.tibber_prices/scripts/check
Julian Pawlowski 0e699ae142 feat(docs): add multi-language entity reference with search
Add a comprehensive entity reference system that helps users find
entities across all 5 supported languages (EN, DE, NO, NL, SV).

Core components:
- Generator script (scripts/docs/generate-sensor-reference) that
  builds sensor-reference.md from translation files with --check
  mode for CI validation
- EntityRef component for compact inline entity annotations with
  tooltip and version-aware linking to the reference table
- EntitySearch component with live filtering, clickable results,
  keyboard navigation, "/" shortcut to focus, category filter chips,
  match highlighting, copy-entity-ID button per row, back-links to
  documentation pages, persistent row highlights, hash-based deep
  linking, and mobile-responsive layout
- MDXComponents theme override for global component registration

Documentation updates:
- New sensor-reference.md page (115 entities x 5 languages)
- EntityRef annotations across 10 documentation pages
- Sidebar entry for quick navigation
- CI integration (docusaurus.yml + scripts/check)
- Ruff per-file-ignores for scripts/ (T201, INP001)

Impact: Users can now find any entity by its localized display name
regardless of their UI language. Inline EntityRef annotations link
directly to the multi-language lookup table with version-aware URLs.
2026-04-11 09:55:28 +00:00

35 lines
739 B
Bash
Executable file

#!/bin/bash
# script/check: Run linting and type checking tools together
#
# Runs both type-check (Pyright) and lint-check (Ruff) in sequence.
# Recommended before committing changes.
#
# Usage:
# ./scripts/check
#
# Examples:
# ./scripts/check
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$SCRIPT_DIR/.."
# shellcheck source=scripts/.lib/output.sh
source "$SCRIPT_DIR/.lib/output.sh"
if [[ -z ${VIRTUAL_ENV:-} ]]; then
# shellcheck source=/dev/null
source "$HOME/.venv/bin/activate"
fi
"$SCRIPT_DIR/type-check"
echo ""
"$SCRIPT_DIR/lint-check"
echo ""
log_header "Checking sensor reference freshness..."
python3 "$SCRIPT_DIR/docs/generate-sensor-reference" --check
log_success "All checks passed"