Hassock.Config (hassock v0.2.0)

Copy Markdown View Source

Configuration for connecting to a Home Assistant instance.

Summary

Functions

Build the WebSocket URL from a base HA URL.

Types

t()

@type t() :: %Hassock.Config{token: String.t(), url: String.t()}

Functions

websocket_url(config)

@spec websocket_url(t()) :: String.t()

Build the WebSocket URL from a base HA URL.

Converts http:// to ws:// and https:// to wss://, and appends /api/websocket.