| name | lovelace-strategy |
| description | Workflows for developing, building, bundling, and testing the TypeScript / Lit Lovelace dashboard strategy in lovelace_strategy/. |
Keymaster Lovelace Strategy Development Guide
This skill guides development on the TypeScript/Lit custom strategy located in
lovelace_strategy/.
Directory Layout & Assets
lovelace_strategy/: TypeScript source files for the Lovelace strategy.
custom_components/keymaster/www/: Destination directory for built
JavaScript bundle distribution.
vitest.config.ts: Vitest test runner configuration.
rollup.config.js: Rollup bundling configuration.
scripts/compare_lovelace_output.py: Verifies generated Lovelace dashboard
views.
Commands
All frontend operations should be executed via yarn:
yarn install
yarn build
yarn test
yarn test:coverage
yarn lint
yarn lint:fix
Testing Dashboard Generation
When altering card definitions or view strategies:
-
Run yarn test to verify Vitest unit specs.
-
Build the bundle with yarn build.
-
If applicable, run Python strategy comparison:
python3 scripts/compare_lovelace_output.py