Skip to content

Commit

Permalink
Merge pull request #1002 from panhans/main
Browse files Browse the repository at this point in the history
Add group by capability for graph card
  • Loading branch information
basbruss authored Sep 16, 2022
2 parents 9f0cce7 + 35b121a commit 3042ca7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ card_graph:
ulm_card_graph_hours: 24
ulm_card_graph_type: "fill"
ulm_card_graph_points: "0.5"
ulm_card_graph_group_by: "interval"
triggers_update: "all"
custom_fields:
item1:
Expand Down Expand Up @@ -51,6 +52,7 @@ card_graph:
fill: "[[[ return variables.ulm_card_graph_type=='fill'?true:false; ]]]"
hours_to_show: "[[[ return variables.ulm_card_graph_hours; ]]]"
points_per_hour: "[[[ return variables.ulm_card_graph_points; ]]]"
group_by: "[[[ return variables.ulm_card_graph_group_by; ]]]"
style: |
ha-card {
box-shadow: none;
Expand Down
2 changes: 2 additions & 0 deletions docs/usage/cards/card_graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The `card_graph` shows an entity with the actual state and a *min-graph-card* in
| ulm_card_graph_type | fill | :material-close: | This is to change the appearance of the graph. Default is fill, but line, bar are valid options. |
| ulm_card_graph_hours | 24 | :material-close: | How much time should the graph cover, default is 24 hours. |
| ulm_card_graph_points | 0.5 | :material-close: | Specify amount of data points the graph should display for each hour. A larger number results in a more detailed graph. |
| ulm_card_graph_group_by | interval | :material-close: | Specify type of grouping of data, dynamic interval, date or hour. |

## Usage

Expand All @@ -40,6 +41,7 @@ The `card_graph` shows an entity with the actual state and a *min-graph-card* in
ulm_card_graph_entity2: sensor.bedgroom_temperature
ulm_card_graph_type: fill
ulm_card_graph_hours: 24
ulm_card_graph_group_by: interval
```
??? note "Template Code"
Expand Down

0 comments on commit 3042ca7

Please sign in to comment.