From 131d5e93134f8a3da01a22bb1d5b780155390b55 Mon Sep 17 00:00:00 2001 From: Zuckerberg Date: Sat, 12 Jul 2025 10:50:37 -0700 Subject: [PATCH] Add rest command for home assistant --- machines/storage/s0/home-automation.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/machines/storage/s0/home-automation.nix b/machines/storage/s0/home-automation.nix index 34006fc..55c4cbd 100644 --- a/machines/storage/s0/home-automation.nix +++ b/machines/storage/s0/home-automation.nix @@ -47,6 +47,7 @@ enable = true; extraComponents = [ "default_config" + "rest_command" "esphome" "met" "radio_browser" @@ -75,7 +76,6 @@ "zha" "bluetooth" ]; - # config = null; config = { # Includes dependencies for a basic setup # https://www.home-assistant.io/integrations/default_config/ @@ -94,6 +94,15 @@ ]; # Allow using automations generated from the UI "automation ui" = "!include automations.yaml"; + + "rest_command" = { + json_post_request = { + url = "{{ url }}"; + method = "POST"; + content_type = "application/json"; + payload = "{{ payload | default('{}') }}"; + }; + }; }; }; }