Skip to content

✨ New Features & πŸ› Bug fixes

Choose a tag to compare

@cataseven cataseven released this 19 Jun 06:52
1683c2b

⭐ Support

If you like this card, feel free to ⭐ star the project on GitHub and share it with the Home Assistant community


✨ New features

πŸ”¦ Period highlight on bar charts (#259)

When you hover a bar, the background of that whole period is now shaded, so it is easy to see where each period begins and ends. This is especially helpful with multiple entities drawn side by side, where the small gaps between adjacent periods otherwise make boundaries hard to read.

  • New period_highlight option (off by default).
  • New period_highlight_color option to set the band color. It accepts any CSS color (hex, rgba, name) or variable; leave it empty for a subtle theme grey. You can also theme it globally with the --sgc-period-highlight-color CSS variable.
  • Available in the visual editor (Tooltip section) and in YAML.
  • Works whether or not the tooltip itself is enabled.
type: custom:statistics-graph-chart-card
period_highlight: true
period_highlight_color: rgba(128,128,128,0.3)
graph_type: bar
group_by: date
entities:
  - sensor.garage_temp
  - sensor.kids_room_temp
  - sensor.living_room_temp
image

πŸš₯ Dynamic color thresholds with entity references (#258)

Color threshold rows now accept entity references for both the value and the color. Use sensor.x for an entity's state, or sensor.x.attribute for one of its attributes. This lets thresholds follow other sensors (for example a seasonal or dynamic target) instead of being fixed numbers.

template:
  - sensor:
      - name: Seasonal Thresholds
        state: "{{ now().month }}"
        attributes:
          t1: "{{ 12 if now().month in [12,1,2] else 30 if now().month in [6,7,8] else 22 }}"
          t2: "{{ 8  if now().month in [12,1,2] else 25 if now().month in [6,7,8] else 16 }}"
          t3: "{{ 3  if now().month in [12,1,2] else 18 if now().month in [6,7,8] else 10 }}"
          t4: "{{ 0  if now().month in [12,1,2] else 12 if now().month in [6,7,8] else 5  }}"
          c1: "#e74c3c"
          c2: "#f39c12"
          c3: "#2ecc71"
          c4: "#3498db"
type: custom:statistics-graph-chart-card
show_x_ticks: true
animate_graph: true
show_pph_picker: true
show_group_by_picker: true
hours_to_show: 240
tooltip_match_axis: false
tooltip_order: default
height: 300
y_axis_decimals: 0
x_grid_style: dashed
y_grid_style: dashed
show_date_picker: true
date_picker_default_mode: day
date_picker_modes:
  - last_30d
entities:
  - entity: sensor.temperature
    name: Outside temperature
    color: "#378ADD"
    line_width: 1.5
    points_per_hour: 5
    color_thresholds:
      enabled: true
      values:
        - value: sensor.seasonal_thresholds.t1
          color: sensor.seasonal_thresholds.c1
        - value: sensor.seasonal_thresholds.t2
          color: sensor.seasonal_thresholds.c2
        - value: sensor.seasonal_thresholds.t3
          color: sensor.seasonal_thresholds.c3
        - value: sensor.seasonal_thresholds.t4
          color: sensor.seasonal_thresholds.c4
    tap_action:
      action: more-info
      entity: automation.device_camera_recording
annotations: []

🎬 Improvements

πŸŒƒ Bar chart animation

animate_graph now animates bar charts as well: bars grow up from the baseline when the chart renders. Previously only line charts animated.

animate

πŸ› Bug fixes

Line draw-in gaps and 7-day LTS display (#253)

Incorrect aggregation with group by date or week (#254)

State row value for offset series (#256)

Tooltip markers on multi-entity bar charts


⭐ Support

If you like this card, feel free to ⭐ star the project on GitHub and share it with the Home Assistant community