ApexCharts Config for Water Meter

Hi! I’m pulling water meter data that continuously increases. I’d like to create a plot that only shows the difference for a specific interval. What’s the easiest way to do this?

Thanks!


This is what the code currently looks like:

type: custom:apexcharts-card
graph_span: 1d
span:
  start: day
show:
  last_updated: true
header:
  show: true
  title: 24-Hour Water Consumption
  show_states: true
  colorize_states: true
  standard_format: false
now:
  show: true
  color: red
  label: Now
series:
  - entity: sensor.water_meter
    type: line
    color: steelblue
    group_by:
      func: last
series:
  - entity: sensor.water_meter
    color: steelblue
    type: column
    group_by:
      func: diff
      duration: 1h