@hass-blocks/hass-ts

Function

NameDescription
getConfigParse Home Assistant configuration from environment variables
initialiseClientInitialise the http and websocket connections and return a client that is ready to use. Use with getConfig to get the correct config values

Interface

NameDescription
CalendarDetails
CallServiceCommandWebsocket command to call a Home Assistant service
CallServiceResponseResponse from the websocket API when a service is called
Config
ContextUsed to tie events and states together. See Home Assistant Website
Event_2
EventDetails
GetHistoryParamsConfiguration parameters for a request to the endpoint
GetLogbookParamsParameters for a request to the /api/logbook endpoint
HassAreaAn area registered with home assistant
HassConfig
HassDeviceA registered Home Assistant device
HassEntity
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
TriggerEventMessageA message received from Home Assistant when a trigger is fired

TypeAlias

NameDescription
LogBookEntryAn entry in the Home Assistant logbook