From 7fa5032311a66c7b77eba98b32dcb031ac2a26b6 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Wed, 18 Sep 2024 11:43:22 -0400 Subject: [PATCH] feat(hass): add get_attributes voice command --- .../modules/home-assistant/docs/functions.nix | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/devices/homie/modules/home-assistant/docs/functions.nix b/devices/homie/modules/home-assistant/docs/functions.nix index a7967b87..f931555f 100644 --- a/devices/homie/modules/home-assistant/docs/functions.nix +++ b/devices/homie/modules/home-assistant/docs/functions.nix @@ -3,6 +3,30 @@ let inherit (import ../../../../../lib {}) lib; inherit (lib) concatStrings concatStringsSep splitString; in [ + { + spec = { + name = "get_attributes"; + description = "Get attributes of any home assistant entity"; + parameters = { + type = "object"; + + properties = { + entity_id = { + type = "string"; + description = "entity_id"; + }; + }; + + required = ["entity_id"]; + }; + }; + + function = { + type = "template"; + value_template = "{{ states[entity_id] }}"; + }; + } + { spec = { name = "timer_start";