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
+25-6Lines changed: 25 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,18 +192,37 @@ entities:
192
192
193
193
The option `auto` makes the period relative to the currently visible time range. It picks the longest period, such that there are at least 100 datapoints in screen.
194
194
195
-
#### for entities with state_class=measurement (normal sensors, like temperature)
195
+
#### for entities with state_class=total (such as utility meters)
196
196
197
197
```yaml
198
198
type: custom:plotly-graph
199
199
entities:
200
200
- entity: sensor.temperature
201
-
statistic: max # `min`, `mean` of `max`
202
-
# for entities with state_class=total (such as utility meters):
203
201
statistic: state # `state` or `sum`
204
-
205
202
period: 5minute # `5minute`, `hour`, `day`, `week`, `month`, `auto` # `auto` varies the period depending on the zoom level
203
+
```
206
204
205
+
#### automatic period
206
+
207
+
The period will automatically adapt to the visible range.
208
+
209
+
```yaml
210
+
type: custom:plotly-graph
211
+
entities:
212
+
- entity: sensor.temperature
213
+
statistic: mean
214
+
period: auto
215
+
```
216
+
217
+
equivalent to:
218
+
219
+
```yaml
220
+
period:
221
+
0s: 5minute
222
+
1d: hour
223
+
7d: day
224
+
28d: week
225
+
12M: month # note uppercase M
207
226
```
208
227
209
228
#### step function for auto period
@@ -214,10 +233,10 @@ entities:
214
233
- entity: sensor.temperature
215
234
statistic: mean
216
235
period:
217
-
0: 5minute
236
+
0s: 5minute
218
237
24h: hour # when the visible range is ≥ 1 day, use the `hour` period
219
238
7d: day # from 7 days on, use `day`
220
-
#6M: week # not yet supported in HA
239
+
6M: week #from 6 months on, use weeks. Note Uppercase M! (lower case m means minutes)
0 commit comments