mirror of
https://github.com/acon96/home-llm.git
synced 2026-01-09 13:48:05 -05:00
properly expose scripts
This commit is contained in:
@@ -690,10 +690,17 @@ class LocalLLMAgent(AbstractConversationAgent):
|
||||
if llm_api.api.id == HOME_LLM_API_ID:
|
||||
service_dict = self.hass.services.async_services()
|
||||
all_services = []
|
||||
scripts_added = False
|
||||
for domain in domains:
|
||||
# scripts show up as individual services
|
||||
if domain == "script":
|
||||
all_services.extend(["script.reload()", "script.turn_on()", "script.turn_off()", "script.toggle()"])
|
||||
if domain == "script" and not scripts_added:
|
||||
all_services.extend([
|
||||
("script.reload", vol.Schema({}), ""),
|
||||
("script.turn_on", vol.Schema({}), ""),
|
||||
("script.turn_off", vol.Schema({}), ""),
|
||||
("script.toggle", vol.Schema({}), ""),
|
||||
])
|
||||
scripts_added = True
|
||||
continue
|
||||
|
||||
for name, service in service_dict.get(domain, {}).items():
|
||||
|
||||
Reference in New Issue
Block a user