You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -243,14 +243,14 @@ entities:
243
243
Note that `5minute` period statistics are limited in time as normal recorder history is, contrary to other periods which keep data for years.
244
244
245
245
## Offsets
246
+
246
247
Offsets are useful to shift data in the temporal axis. For example, if you have a sensor that reports the forecasted temperature 3 hours from now, it means that the current value should be plotted in the future. With the `offset` attribute you can shift the data so it is placed in the correct position.
247
248
Another possible use is to compare past data with the current one. For example, you can plot yesterday's temperature and the current one on top of each other.
248
249
249
250
The `offset` flag can be specified in two places.
250
251
**1)** When used at the top level of the configuration, it specifies how much "future" the graph shows by default. For example, if `hours_to_show` is 16 and `offset` is 3h, the graph shows the past 13 hours (16-3) plus the next 3 hours.
251
252
**2)** When used at the trace level, it offsets the trace by the specified amount.
252
253
253
-
254
254
```yaml
255
255
type: custom:plotly-graph
256
256
hours_to_show: 16
@@ -279,6 +279,7 @@ entities:
279
279

280
280
281
281
### Now line
282
+
282
283
When using offsets, it is useful to have a line that indicates the current time. This can be done by using a lambda function that returns a line with the current time as x value and 0 and 1 as y values. The line is then hidden from the legend.
283
284
284
285
```yaml
@@ -310,10 +311,11 @@ layout:
310
311

311
312
312
313
## Duration
314
+
313
315
Whenever a time duration can be specified, this is the notation to use:
314
316
315
317
| Unit | Suffix | Notes |
316
-
|--------------|--------|----------|
318
+
|------------ | ------ | --------|
317
319
| Milliseconds | `ms` | |
318
320
| Seconds | `s` | |
319
321
| Minutes | `m` | |
@@ -324,6 +326,7 @@ Whenever a time duration can be specified, this is the notation to use:
324
326
| Years | `y` | 365 days |
325
327
326
328
Example:
329
+
327
330
```yaml
328
331
offset: 3h
329
332
```
@@ -543,7 +546,7 @@ More here: https://developers.home-assistant.io/docs/api/rest/ under `/api/histo
543
546
544
547
Caveats:
545
548
546
-
1. This configuration will be ignored (will be true) while fetching [Attribute Values](#Attribute-Values).
549
+
1. This configuration will be ignored (will be false) while fetching [Attribute Values](#Attribute-Values).
0 commit comments