GithubHelp home page GithubHelp logo

flori2203 / homeassistant-react-lovelace Goto Github PK

View Code? Open in Web Editor NEW

This project forked from samuelthng/homeassistant-react-lovelace

0.0 0.0 0.0 39 KB

Proof of Concept: Mounting react applications efficiently as a custom lovelace card using @preact/signals-react.

JavaScript 8.07% TypeScript 91.93%

homeassistant-react-lovelace's Introduction

Home Assistant: React Lovelace Card

(React + TypeScript + Vite)

This project was bootstrapped from the @vite template which provides a minimal setup to get React working in Vite with some ESLint rules.

To install:

Node.js

npm install

Bun.js

bun install

To build with profiler:

Node.js

npx vite build --mode development

Bun.js

bun x vite build --mode development

To build with minification and optimisations:

Node.js

npx vite build

Bun.js

bun x vite build

To add to Lovelace:

  1. Build the app
  2. Copy the built bundle located at dist/react-card.js
  3. Paste your bundle into /config/www/react-card.js of your Home Assistant setup
  4. Add /local/react-card.js as a resource on Lovelace
  5. Reload your Home Assistant
  6. 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.

image

homeassistant-react-lovelace's People

Contributors

samuelthng avatar zthng avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.