From b46a4d50aeb2ad22464dc4edb0ba63b11562a440 Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 7 Mar 2019 20:24:29 -0800 Subject: [PATCH] feat(get-history): Add flatten option Instead of returning the data from home assistant ( array for each entity_id ) return one flattened array of one item per history entry --- nodes/get-history/get-history.html | 22 +++++++++++++++++----- nodes/get-history/get-history.js | 15 +++++++++++++-- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/nodes/get-history/get-history.html b/nodes/get-history/get-history.html index 7e1df89759..8c037a09e9 100644 --- a/nodes/get-history/get-history.html +++ b/nodes/get-history/get-history.html @@ -11,6 +11,7 @@ entityidtype: { value: "" }, useRelativeTime: { value: false }, relativeTime: { value: "" }, + flatten: { value: true }, output_type: { value: "array" }, output_location_type: { value: "msg" }, output_location: { value: "payload" } @@ -125,7 +126,9 @@ .trigger("change"); }, oneditsave: function() { - this.entityid = $("#entity_id").val(); + this.entityid = $("#entity_id") + .val() + .trim(); } }); @@ -154,7 +157,7 @@
-   +  
@@ -194,6 +197,11 @@ +
+   + +
+