This project was bootstrapped from the @vite template which provides a minimal setup to get React working in Vite with some ESLint rules.
Node.js
npm install
Bun.js
bun install
Node.js
npx vite build --mode development
Bun.js
bun x vite build --mode development
Node.js
npx vite build
Bun.js
bun x vite build
- Build the app
- Copy the built bundle located at
dist/react-card.js
- Paste your bundle into
/config/www/react-card.js
of your Home Assistant setup - Add
/local/react-card.js
as a resource on Lovelace - Reload your Home Assistant
- Create your custom card:
type: custom:react-card entity: sun.sun
Note: Be sure to open Home Assistant using it's local address if your component does not seem to update after inserting a new version.