mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-14 04:46:49 +00:00
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
This commit is contained in:
parent
be15ab6d55
commit
4f7ea4d127
@ -49,12 +49,12 @@ unit_prefix:
|
|||||||
default: None
|
default: None
|
||||||
type: string
|
type: string
|
||||||
unit_time:
|
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
|
required: false
|
||||||
default: h
|
default: h
|
||||||
type: string
|
type: string
|
||||||
unit:
|
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
|
required: false
|
||||||
type: string
|
type: string
|
||||||
time_window:
|
time_window:
|
||||||
@ -78,6 +78,6 @@ sensor:
|
|||||||
source: sensor.temperature
|
source: sensor.temperature
|
||||||
name: Temperature change per hour
|
name: Temperature change per hour
|
||||||
round: 1
|
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
|
time_window: "00:30:00" # we look at the change over the last half hour
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user