From 798cc338399a93689972d5a96d24ee9ff18268fc Mon Sep 17 00:00:00 2001 From: Benedict Aas Date: Thu, 14 Jun 2018 19:07:16 +0100 Subject: [PATCH] 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. --- source/_components/sensor.simulated.markdown | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/_components/sensor.simulated.markdown b/source/_components/sensor.simulated.markdown index de2a11383d9..07b97c8fce1 100644 --- a/source/_components/sensor.simulated.markdown +++ b/source/_components/sensor.simulated.markdown @@ -81,6 +81,11 @@ spread: required: false default: None 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 %} ## {% linkable_title Example %} @@ -96,4 +101,5 @@ sensor: mean: 50 spread: 10 seed: 999 + relative_to_epoch: false ```