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
+29-3Lines changed: 29 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -180,11 +180,24 @@ entities:
180
180
181
181
Fetch and plot long-term statistics of an entity
182
182
183
+
#### for entities with state_class=measurement (normal sensors, like temperature)
184
+
185
+
```yaml
186
+
type: custom:plotly-graph
187
+
entities:
188
+
- entity: sensor.temperature
189
+
statistic: max # `min`, `mean` of `max`
190
+
period: 5minute # `5minute`, `hour`, `day`, `week`, `month`, `auto` # `auto` varies the period depending on the zoom level
191
+
```
192
+
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
+
195
+
#### for entities with state_class=measurement (normal sensors, like temperature)
196
+
183
197
```yaml
184
198
type: custom:plotly-graph
185
199
entities:
186
200
- entity: sensor.temperature
187
-
# for entities with state_class=measurement (normal sensors, like temperature):
188
201
statistic: max # `min`, `mean` of `max`
189
202
# for entities with state_class=total (such as utility meters):
190
203
statistic: state # `state` or `sum`
@@ -193,9 +206,22 @@ entities:
193
206
194
207
```
195
208
196
-
Note that `5minute` period statistics are limited in time as normal recorder history is, contrary to other periods which keep data for years.
209
+
#### step function for auto period
197
210
198
-
The option `auto` makes the period relative to the currently visible time range. It picks the longest period, such that there are at least 500 datapoints in screen.
211
+
```yaml
212
+
type: custom:plotly-graph
213
+
entities:
214
+
- entity: sensor.temperature
215
+
statistic: mean
216
+
period:
217
+
0: 5minute
218
+
24h: hour # when the visible range is ≥ 1 day, use the `hour` period
219
+
7d: day # from 7 days on, use `day`
220
+
# 6M: week # not yet supported in HA
221
+
1y: month # from 1 year on, use `month
222
+
```
223
+
224
+
Note that `5minute` period statistics are limited in time as normal recorder history is, contrary to other periods which keep data for years.
0 commit comments