mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-18 23:06:31 +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,
|
||||
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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user