From 1d3ee93979d50339841a1727bf5020045f4b1178 Mon Sep 17 00:00:00 2001 From: Diogo Gomes Date: Thu, 14 Feb 2019 04:27:05 +0000 Subject: [PATCH] Add method option to sensor.integration (#8557) * add method option * Update source/_components/sensor.integration.markdown Co-Authored-By: dgomes --- source/_components/sensor.integration.markdown | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/_components/sensor.integration.markdown b/source/_components/sensor.integration.markdown index 2e35f2d9994..30c18300146 100644 --- a/source/_components/sensor.integration.markdown +++ b/source/_components/sensor.integration.markdown @@ -7,14 +7,16 @@ sidebar: true comments: false sharing: true footer: true -ha_category: Utility +ha_category: + - Utility + - Energy ha_release: 0.87 ha_iot_class: "Local Push" logo: integral.png ha_qa_scale: internal --- -The `integration` platform provides the [Riemann sum](https://en.wikipedia.org/wiki/Riemann_sum) of the values provided by a source sensor. The Riemann sum is an approximation of an **integral** by a finite sum. In this implementation, we follow the Trapezoidal rule. +The `integration` platform provides the [Riemann sum](https://en.wikipedia.org/wiki/Riemann_sum) of the values provided by a source sensor. The Riemann sum is an approximation of an **integral** by a finite sum. In this implementation, the default is the Trapezoidal method, but Left and Right methods can optionally be used. ## {% linkable_title Configuration %} @@ -56,6 +58,10 @@ unit: description: Unit of Measurement to be used for the integration. required: false type: string +method: + description: Riemann sum method to be used. Available methods are trapezoidal, left, right. + required: false + default: trapezoidal {% endconfiguration %} If 'unit' is set then 'unit_prefix' and 'unit_time' are ignored.