Home Page

@hass-blocks/homeassistant-typescript

Function

NameDescription
getConfigParse Home Assistant config from environment variables,HASS_TOKEN - access token HASS_WS_PATH - url path portion for the websocket API HASS_HTTP_PATH - url path portion for the HTTP API HASS_HOST - home assistant host HASS_PORT - home assistant port,Note - will supply the correct default values for the http and websocket path segment. When executed in the context of an addon, no environment variables need to be supplied
initialiseClientInitialise the http and websocket connections and return a client that is ready to use. Use with , to get the correct config values

Interface

NameDescription
CalendarDetails
CallServiceCommand
CallServiceResponse
Config
ContextUsed to tie events and states together. See
Event_2
EventDetails
GetHistoryParams
GetLogbookParams
HassAreaAn area registered with home assistant
HassConfig
HassDeviceA registered Home Assistant device
IClientThe Home Assistant client API. Once initialised, the client will make requests via **either** the websocket or HTTP API where appropriate
Logger
Panel
Service
ServiceDomainDetails
State
TriggerEventMessage

TypeAlias

NameDescription
LogBookEntryAn entry in the Home Assistant logbook
>