Skip to content

ApexChartsTodayHourlyValues

Luis Miranda edited this page Jan 2, 2024 · 12 revisions

ApexChart: Today's hourly values

Plot the hourly values for an entire day using the values stored in each sensor's today_hours or tomorrow_hours attribute.

Graph showing day's hourly values

type: custom:apexcharts-card
update_interval: 30m
now:
  show: true
span:
  start: day
graph_span: 1d
all_series_config:
  stroke_width: 1
  type: line
  curve: stepline
  group_by:
    func: avg
    duration: 1h
  show:
    extremas: true
    legend_value: false
  data_generator: |
      return Object.entries(entity.attributes.today_hours).map(([dateString, price]) => [ new Date(dateString), price ])
series:
  - entity: sensor.omie_spot_price_pt
    name: Hourly price
yaxis:
  - id: price
    align_to: 10