mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-19 15:26:29 +00:00
Add example how to register API with HA (#2206)
This commit is contained in:
parent
7abb5fb061
commit
199a48d5f6
@ -267,6 +267,11 @@ class MyAPI(API):
|
|||||||
llm_context=llm_context,
|
llm_context=llm_context,
|
||||||
tools=[TimeTool()],
|
tools=[TimeTool()],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
async def async_setup_api(hass: HomeAssistant) -> None:
|
||||||
|
"""Register the API with Home Assistant."""
|
||||||
|
llm.async_register_api(hass, MyAPI())
|
||||||
```
|
```
|
||||||
|
|
||||||
The `llm.API` class has the following attributes:
|
The `llm.API` class has the following attributes:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user