An implementation of the ESPHome WebServer API. Primarily written for use in ESPHome Web App.
npm install esphome-web
import ESPHomeWeb from 'esphome-web';
const esphome = new ESPHomeWeb(hostname);
esphome.addEventListener('entitydiscovered', (event) => {
console.log('New entity discovered', event.detail.entity);
});
esphome.connect();