callService
Call a service on the Home Assistant API
Signature
callService(params: ICallServiceParams): Promise<State[]>;
Parameters
| Name | Type | Description |
|---|---|---|
| params | ICallServiceParams | |
Return Value
Promise<State[]> An initialised Home Assistant connection that blocks can used to inspect state or make calls to services
| Name | i-hass |
|---|---|
| Type | Interface |
| Path | packages/blocks/src/types/i-hass.ts |
Call a service on the Home Assistant API
callService(params: ICallServiceParams): Promise<State[]>;
| Name | Type | Description |
|---|---|---|
| params | ICallServiceParams | |
Promise<State[]> Get the full entity description of a given entity
getEntity(id: string): HassEntity;
| Name | Type | Description |
|---|---|---|
| id | string | |
HassEntity Get the current state of a given entity
getState(id: string): string;
| Name | Type | Description |
|---|---|---|
| id | string | |
string