mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-09 10:26:52 +00:00
add relative time option to simulated sensors (#5223)
This is the documentation for the change outlined below. By default simulated sensors are relative to when they're activated, instead we change this default to a new toggleable option, 'relative_to_epoch', and instead they become 'absolute', or relative to 1970-01-01 00:00:00.
This commit is contained in:
parent
b6233a6073
commit
798cc33839
@ -81,6 +81,11 @@ spread:
|
|||||||
required: false
|
required: false
|
||||||
default: None
|
default: None
|
||||||
type: float
|
type: float
|
||||||
|
relative_to_epoch:
|
||||||
|
description: Whether to simulate from epoch time (00:00:00, 1970-01-01), or relative to when the sensor was started.
|
||||||
|
required: false
|
||||||
|
default: true
|
||||||
|
type: boolean
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
## {% linkable_title Example %}
|
## {% linkable_title Example %}
|
||||||
@ -96,4 +101,5 @@ sensor:
|
|||||||
mean: 50
|
mean: 50
|
||||||
spread: 10
|
spread: 10
|
||||||
seed: 999
|
seed: 999
|
||||||
|
relative_to_epoch: false
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user