27 lines
1.1 KiB
Nix
27 lines
1.1 KiB
Nix
{
|
|
services.home-assistant.config = {
|
|
rest_command = {
|
|
moltbot_home_arrival = {
|
|
url = "https://moltbot.cloonar.com/hooks/agent";
|
|
method = "POST";
|
|
headers = {
|
|
Authorization = "!secret moltbot_home_arrival";
|
|
Content-Type = "application/json";
|
|
};
|
|
payload = ''{"message":"Home arrival. Read memory/arrival-reminders.json silently. For each item: if it's a task (fetch weather, check calendar, look something up, etc.), execute it. If it's a simple reminder, include it. Combine everything into ONE message with just the results - no preamble, no explanations, no mentioning files or process. Then clear the file. If empty: reply NO_REPLY","name":"HomeArrival","deliver":true,"channel":"whatsapp","to":"+436607055308"}'';
|
|
};
|
|
};
|
|
"automation home_arrival" = {
|
|
alias = "home_arrival";
|
|
trigger = {
|
|
platform = "zone";
|
|
entity_id = "person.dominik";
|
|
zone = "zone.home";
|
|
event = "enter";
|
|
};
|
|
action = {
|
|
service = "rest_command.moltbot_home_arrival";
|
|
};
|
|
};
|
|
};
|
|
}
|