HaAuth.HA.OneShot (ha_auth v0.1.0)

Copy Markdown View Source

One websocket command to HA: connect, authenticate with token, send command, return its result, close. For what HA only offers over the websocket (auth/current_user, config/auth/list).

Summary

Functions

call(token, command)

@spec call(String.t(), map()) :: {:ok, term()} | {:error, term()}