Properties
Readonly
calendar
calendar: {
list: (() => Promise<{
data: {
calendar?: string;
entity_id?: string;
}[];
status: number;
}>);
retrieve: ((entityId: string) => Promise<{
data: {
description?: string;
end?: Without<{
dateTime?: string;
}, {
date?: string;
}> & {
date?: string;
} | Without<{
date?: string;
}, {
dateTime?: string;
}> & {
dateTime?: string;
};
location?: string;
start?: Without<{
dateTime?: string;
}, {
date?: string;
}> & {
date?: string;
} | Without<{
date?: string;
}, {
dateTime?: string;
}> & {
dateTime?: string;
};
summary?: string;
}[];
status: number;
}>);
} = ...
Type declaration
-
list: (() => Promise<{
data: {
calendar?: string;
entity_id?: string;
}[];
status: number;
}>)
-
- (): Promise<{
data: {
calendar?: string;
entity_id?: string;
}[];
status: number;
}>
-
Returns Promise<{
data: {
calendar?: string;
entity_id?: string;
}[];
status: number;
}>
-
retrieve: ((entityId: string) => Promise<{
data: {
description?: string;
end?: Without<{
dateTime?: string;
}, {
date?: string;
}> & {
date?: string;
} | Without<{
date?: string;
}, {
dateTime?: string;
}> & {
dateTime?: string;
};
location?: string;
start?: Without<{
dateTime?: string;
}, {
date?: string;
}> & {
date?: string;
} | Without<{
date?: string;
}, {
dateTime?: string;
}> & {
dateTime?: string;
};
summary?: string;
}[];
status: number;
}>)
-
- (entityId: string): Promise<{
data: {
description?: string;
end?: Without<{
dateTime?: string;
}, {
date?: string;
}> & {
date?: string;
} | Without<{
date?: string;
}, {
dateTime?: string;
}> & {
dateTime?: string;
};
location?: string;
start?: Without<{
dateTime?: string;
}, {
date?: string;
}> & {
date?: string;
} | Without<{
date?: string;
}, {
dateTime?: string;
}> & {
dateTime?: string;
};
summary?: string;
}[];
status: number;
}>
-
Returns Promise<{
data: {
description?: string;
end?: Without<{
dateTime?: string;
}, {
date?: string;
}> & {
date?: string;
} | Without<{
date?: string;
}, {
dateTime?: string;
}> & {
dateTime?: string;
};
location?: string;
start?: Without<{
dateTime?: string;
}, {
date?: string;
}> & {
date?: string;
} | Without<{
date?: string;
}, {
dateTime?: string;
}> & {
dateTime?: string;
};
summary?: string;
}[];
status: number;
}>
Private
Readonly
client
client
: { configure
: ((config
: FetchConfig) => void); path
: (<P>(path
: P) => { method
: (<M>(method
: M) => { create
: CreateFetch<M, paths[P][M]>; }); }); use
: ((mw
: Middleware) => number); } = ...
Type declaration
-
configure: ((config: FetchConfig) => void)
-
- (config: FetchConfig): void
-
Returns void
-
path: (<P>(path: P) => {
method: (<M>(method: M) => {
create: CreateFetch<M, paths[P][M]>;
});
})
-
- <P>(path: P): {
method: (<M>(method: M) => {
create: CreateFetch<M, paths[P][M]>;
});
}
-
Returns {
method: (<M>(method: M) => {
create: CreateFetch<M, paths[P][M]>;
});
}
-
method: (<M>(method: M) => {
create: CreateFetch<M, paths[P][M]>;
})
-
- <M>(method: M): {
create: CreateFetch<M, paths[P][M]>;
}
-
Type Parameters
-
M extends string | number | symbol
Returns {
create: CreateFetch<M, paths[P][M]>;
}
-
create: CreateFetch<M, paths[P][M]>
-
use: ((mw: Middleware) => number)
-
- (mw: Middleware): number
-
Returns number
Readonly
config
config: {
retrieve: (() => Promise<{
data: {
components?: string[];
config_dir?: string;
elevation?: number;
latitude?: number;
location_name?: string;
longitude?: number;
time_zone?: string;
unit_system?: {
length?: string;
mass?: string;
pressure?: string;
temperature?: string;
volume?: string;
};
version?: string;
whitelist_external_dirs?: string[];
};
status: number;
}>);
} = ...
Type declaration
-
retrieve: (() => Promise<{
data: {
components?: string[];
config_dir?: string;
elevation?: number;
latitude?: number;
location_name?: string;
longitude?: number;
time_zone?: string;
unit_system?: {
length?: string;
mass?: string;
pressure?: string;
temperature?: string;
volume?: string;
};
version?: string;
whitelist_external_dirs?: string[];
};
status: number;
}>)
-
- (): Promise<{
data: {
components?: string[];
config_dir?: string;
elevation?: number;
latitude?: number;
location_name?: string;
longitude?: number;
time_zone?: string;
unit_system?: {
length?: string;
mass?: string;
pressure?: string;
temperature?: string;
volume?: string;
};
version?: string;
whitelist_external_dirs?: string[];
};
status: number;
}>
-
Returns Promise<{
data: {
components?: string[];
config_dir?: string;
elevation?: number;
latitude?: number;
location_name?: string;
longitude?: number;
time_zone?: string;
unit_system?: {
length?: string;
mass?: string;
pressure?: string;
temperature?: string;
volume?: string;
};
version?: string;
whitelist_external_dirs?: string[];
};
status: number;
}>
Readonly
errorlogs
errorlogs: {
list: (() => Promise<{
data: unknown;
status: number;
}>);
} = ...
Type declaration
-
list: (() => Promise<{
data: unknown;
status: number;
}>)
-
- (): Promise<{
data: unknown;
status: number;
}>
-
Returns Promise<{
data: unknown;
status: number;
}>
Readonly
events
events: {
list: (() => Promise<{
data: {
event?: string;
listener_count?: Record<string, never>;
}[];
status: number;
}>);
} = ...
Type declaration
-
list: (() => Promise<{
data: {
event?: string;
listener_count?: Record<string, never>;
}[];
status: number;
}>)
-
- (): Promise<{
data: {
event?: string;
listener_count?: Record<string, never>;
}[];
status: number;
}>
-
Returns Promise<{
data: {
event?: string;
listener_count?: Record<string, never>;
}[];
status: number;
}>
Readonly
health
health: {
retrieve: (() => Promise<{
data: {
message?: string;
};
status: number;
}>);
} = ...
Type declaration
-
retrieve: (() => Promise<{
data: {
message?: string;
};
status: number;
}>)
-
- (): Promise<{
data: {
message?: string;
};
status: number;
}>
-
Returns Promise<{
data: {
message?: string;
};
status: number;
}>
Readonly
logbook
logbook: {
list: ((timestamp?: string) => Promise<{
data: {
context_user_id?: string;
domain?: string;
entity_id?: string;
message?: string;
name?: string;
when?: string;
}[];
status: number;
}>);
} = ...
Type declaration
-
list: ((timestamp?: string) => Promise<{
data: {
context_user_id?: string;
domain?: string;
entity_id?: string;
message?: string;
name?: string;
when?: string;
}[];
status: number;
}>)
-
- (timestamp?: string): Promise<{
data: {
context_user_id?: string;
domain?: string;
entity_id?: string;
message?: string;
name?: string;
when?: string;
}[];
status: number;
}>
-
Parameters
-
Optional
timestamp: string
Returns Promise<{
data: {
context_user_id?: string;
domain?: string;
entity_id?: string;
message?: string;
name?: string;
when?: string;
}[];
status: number;
}>
Readonly
services
services: {
list: (() => Promise<{
data: {
domain?: string;
services?: {
description?: string;
fields?: Record<string, never>;
name?: string;
target?: Record<string, never>;
}[];
}[];
status: number;
}>);
} = ...
Type declaration
-
list: (() => Promise<{
data: {
domain?: string;
services?: {
description?: string;
fields?: Record<string, never>;
name?: string;
target?: Record<string, never>;
}[];
}[];
status: number;
}>)
-
- (): Promise<{
data: {
domain?: string;
services?: {
description?: string;
fields?: Record<string, never>;
name?: string;
target?: Record<string, never>;
}[];
}[];
status: number;
}>
-
Returns Promise<{
data: {
domain?: string;
services?: {
description?: string;
fields?: Record<string, never>;
name?: string;
target?: Record<string, never>;
}[];
}[];
status: number;
}>
Readonly
states
states: {
list: (() => Promise<{
data: {
attributes?: Record<string, never>;
entity_id?: string;
last_changed?: string;
last_updated?: string;
state?: string;
}[];
status: number;
}>);
retrieve: ((entityId: string) => Promise<{
data: {
attributes?: Record<string, never>;
entity_id?: string;
last_changed?: string;
last_updated?: string;
state?: string;
};
status: number;
}>);
} = ...
Type declaration
-
list: (() => Promise<{
data: {
attributes?: Record<string, never>;
entity_id?: string;
last_changed?: string;
last_updated?: string;
state?: string;
}[];
status: number;
}>)
-
- (): Promise<{
data: {
attributes?: Record<string, never>;
entity_id?: string;
last_changed?: string;
last_updated?: string;
state?: string;
}[];
status: number;
}>
-
Returns Promise<{
data: {
attributes?: Record<string, never>;
entity_id?: string;
last_changed?: string;
last_updated?: string;
state?: string;
}[];
status: number;
}>
-
retrieve: ((entityId: string) => Promise<{
data: {
attributes?: Record<string, never>;
entity_id?: string;
last_changed?: string;
last_updated?: string;
state?: string;
};
status: number;
}>)
-
- (entityId: string): Promise<{
data: {
attributes?: Record<string, never>;
entity_id?: string;
last_changed?: string;
last_updated?: string;
state?: string;
};
status: number;
}>
-
Returns Promise<{
data: {
attributes?: Record<string, never>;
entity_id?: string;
last_changed?: string;
last_updated?: string;
state?: string;
};
status: number;
}>
Readonly
template
template: {
render: ((template: string) => Promise<{
data: unknown;
status: number;
}>);
} = ...
Type declaration
-
render: ((template: string) => Promise<{
data: unknown;
status: number;
}>)
-
- (template: string): Promise<{
data: unknown;
status: number;
}>
-
Returns Promise<{
data: unknown;
status: number;
}>
Home Assistant API Client