Add rest command for home assistant

This commit is contained in:
Zuckerberg 2025-07-12 10:50:37 -07:00
parent fe0ce3a245
commit 131d5e9313

View File

@ -47,6 +47,7 @@
enable = true; enable = true;
extraComponents = [ extraComponents = [
"default_config" "default_config"
"rest_command"
"esphome" "esphome"
"met" "met"
"radio_browser" "radio_browser"
@ -75,7 +76,6 @@
"zha" "zha"
"bluetooth" "bluetooth"
]; ];
# config = null;
config = { config = {
# Includes dependencies for a basic setup # Includes dependencies for a basic setup
# https://www.home-assistant.io/integrations/default_config/ # https://www.home-assistant.io/integrations/default_config/
@ -94,6 +94,15 @@
]; ];
# Allow using automations generated from the UI # Allow using automations generated from the UI
"automation ui" = "!include automations.yaml"; "automation ui" = "!include automations.yaml";
"rest_command" = {
json_post_request = {
url = "{{ url }}";
method = "POST";
content_type = "application/json";
payload = "{{ payload | default('{}') }}";
};
};
}; };
}; };
} }