JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 38
  • Score
    100M100P100Q62072F
  • License MIT

Client for Homeassistant's websocket API

Package Exports

  • homeassistant-ws

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (homeassistant-ws) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

homeassistant-ws

Minimalist client library for Homeassistant's Websocket API. Works in node, and also in the browser.


Installation:

Using npm:

$ npm i --save homeassistant-ws

Import it in your project:

import hass from 'homeassistant-ws'

async function main () {
  // Assuming hass running in `localhost`, under the default `8321` port:
  const client = hass({
    token: 'my-secret-token'
  })
}

Tokens are available from your profile page under the Homeassistant UI. For documentation on the authentication API, see the official HA documentation.