ha-hildebrandglow-dcc icon indicating copy to clipboard operation
ha-hildebrandglow-dcc copied to clipboard

Aggregate Week and Month Values? (Improvement)

Open picotrain77 opened this issue 3 years ago • 4 comments

HI Firstly, thank you so much for this integration its awesome as I am finally able to add Gas to my HA instance.

I wonder if its possible to add week and month values as I note only today and year values.

Rossk

picotrain77 avatar Jan 02 '22 16:01 picotrain77

Hi, The energy integration should show these values - it calculates them based on the values of the other sensors over time.

ColinRobbins avatar Jan 02 '22 17:01 ColinRobbins

Hi and thanks for the reply, I dont use the energy integration for my elec as I spent months creating my own before HA introduced it, so for me Elec is already sorted, but Gas is now thankfully available thanks to your great work. I cant populate lovelace with anything gas related other than the day and year entities automatically created unless you know a way of harvesting the data from HA energy ofcourse.

Its not a big deal as I am happy just to have Gas and could of course study the APi documents and create this myself, but as a reasonable novice I have yet to grasp the whole renewing of token / cert as I believe it expires after 7 days.

picotrain77 avatar Jan 02 '22 18:01 picotrain77

Hi, I have this added to my configuration.yaml and testing if this give me the correct weekly, monthly and yearly values.

utility_meter:
  yearly_gas_cost:
    source: sensor.gas_cost_today
    cycle: yearly     
  monthly_gas_cost:
    source: sensor.gas_cost_today
    cycle: monthly
  weekly_gas_cost:
    source: sensor.gas_cost_today
    cycle: weekly    

"sensor.gas_cost_today" is a sensor created by this integration.

benek984 avatar Jan 03 '22 22:01 benek984

Hi, I have this added to my configuration.yaml and testing if this give me the correct weekly, monthly and yearly values.


utility_meter:

  yearly_gas_cost:

    source: sensor.gas_cost_today

    cycle: yearly     

  monthly_gas_cost:

    source: sensor.gas_cost_today

    cycle: monthly

  weekly_gas_cost:

    source: sensor.gas_cost_today

    cycle: weekly    

"sensor.gas_cost_today" is a sensor created by this integration.

Good shout, I will try that option and see how accurate it is due to the loss of the last 30 mins of data from each day. I am also looking at the api as you can call any date range you want from what I can see and that way you could hopefully pull in last week and last month data directly without loss.

picotrain77 avatar Jan 04 '22 06:01 picotrain77

As of v1.0.0 of the integration, the daily sensors should no longer lose the last 30 minutes of each day, so the utility meter sensor should be accurate.

HandyHat avatar Jan 01 '23 17:01 HandyHat