Skip to content

Hacksore/react-ha-iframe

Repository files navigation

react-ha-iframe

Test using react in a lovelace iframe powered by home-assistant-js-websocket for the data connection.

Demo

Pass a long lived apiToken query string param and host if your host differs than the default.

Example card

example

Start the docker container to expose port 3000 then configure the webpage card.

docker run -p 3000:80 hacksore/react-ha-iframe

Configure the card

Imgur

Final thoughts

This is probably not practical to spawn a new socket connection for every card. Maybe you could use message posting to try and only use one socket.

This is just a POC so take what you want from this 😎