Skip to content

Commit 798cc33

Browse files
Shouballoob
authored andcommitted
add relative time option to simulated sensors (home-assistant#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.
1 parent b6233a6 commit 798cc33

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

source/_components/sensor.simulated.markdown

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ spread:
8181
required: false
8282
default: None
8383
type: float
84+
relative_to_epoch:
85+
description: Whether to simulate from epoch time (00:00:00, 1970-01-01), or relative to when the sensor was started.
86+
required: false
87+
default: true
88+
type: boolean
8489
{% endconfiguration %}
8590
8691
## {% linkable_title Example %}
@@ -96,4 +101,5 @@ sensor:
96101
mean: 50
97102
spread: 10
98103
seed: 999
104+
relative_to_epoch: false
99105
```

0 commit comments

Comments
 (0)