Derivative for DSMR Hourly_gas_consumption

As per 2021.7.x the DSMR hourly_gas_consumption has been deprecated.

QUOTE: If you are looking for a replacement, you can use the Derivative integration to re-create the hourly (or any other timeframe) sensor based on the total Gas consumption sensor.

I looked at derivative, you’ll have total gas cunsumption as source, but I don’t see how to create sensor daily_gas and hourly_gas_consumption. I need those sensors in my (created by someone else) Grafana energy dash

Anyone created these? Google was not my friend today!

- platform: derivative
  name: Hourly Gas Consumption
  source: sensor.gas_consumption

This will create a sensor with entity_id: sensor.hourly_gas_consumption

It looks like the utility meter will create the sensor.daily_gas for you.

Thanks Willem, added it to my configuration.yaml

 - platform: derivative
    name: Hourly Gas Consumption
    source: sensor.daily_gas
    unit_time: h
    time_window: "00:01:00"

Updated to 2021.7.x and runs smoothly in Grafana