From 4f7ea4d127d6e10f42f6bbd9cae8300c693f25af Mon Sep 17 00:00:00 2001 From: blissarts <54777977+blissarts@users.noreply.github.com> Date: Fri, 23 Oct 2020 22:54:40 +0200 Subject: [PATCH] Add more clear description of unit (#15370) it was not clear from this documentation how the unit of the derivative sensor is set if the "unit" parameter is not set. This PR should fix that --- source/_integrations/derivative.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/_integrations/derivative.markdown b/source/_integrations/derivative.markdown index 8177b716b67..b1e264e015a 100644 --- a/source/_integrations/derivative.markdown +++ b/source/_integrations/derivative.markdown @@ -49,12 +49,12 @@ unit_prefix: default: None type: string unit_time: - description: SI unit of time of the derivative. Available units are s, min, h, d. + description: SI unit of time of the derivative. Available units are s, min, h, d. If this parameter is set, the attribute **unit_of_measurement** will be set like x/y where x is the unit of the sensor given via the **source** parameter and y is the value given here. required: false default: h type: string unit: - description: Unit of Measurement to be used for the derivative. + description: Unit of Measurement to be used for the derivative. This will overwrite the automatically set **unit_of_measurement** as explained above. required: false type: string time_window: @@ -78,6 +78,6 @@ sensor: source: sensor.temperature name: Temperature change per hour round: 1 - unit_time: h + unit_time: h # the resulting "unit_of_measurement" will be °C/h if the sensor.temperate has set °C as it's unit time_window: "00:30:00" # we look at the change over the last half hour ```