Let me know of excessive or prolonged natural gas usage?

I have my gas meter being read using SDR with utility meters for hourly, daily, weekly, monthly and yearly.

My partner left the gas bbq on overnight and all day today. She noticed when she went to use the grill today. Its clearly plotted in the energy dashboard but, I am uncertain how I can automate being notified about this.

I would need to track something like this: if hourly gas usage > .X m3 for Y hours, let me know. The sensor resets hourly, so a time based automation using the utility meter sensor wont work, afaik.

Does anyone have any ideas? I did try and google and forum search without luck using a setup like this.

This would be an ideal application for the derivative sensor, but it doesn’t work properly unfortunately.

Until that gets fixed, I would recommend using the statistics platform to calculate how much has been consumed over the past “x” hours. Then you can trigger an automation when that sensor goes above your desired hourly consumption rate multiplied by “x”:

sensor:
  - platform: statistics
    name: "Gas consumption over past 2 hours"
    entity_id: sensor.gas_meter_yearly
    state_characteristic: change
    keep_last_sample: true
    max_age:
      hours: 2

Awesome! Thank you!