Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregate Week and Month Values? (Improvement) #110

Closed
picotrain77 opened this issue Jan 2, 2022 · 5 comments · Fixed by #282
Closed

Aggregate Week and Month Values? (Improvement) #110

picotrain77 opened this issue Jan 2, 2022 · 5 comments · Fixed by #282

Comments

@picotrain77
Copy link

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

@ColinRobbins
Copy link
Contributor

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

@picotrain77
Copy link
Author

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.

@benek984
Copy link

benek984 commented Jan 3, 2022

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.

@picotrain77
Copy link
Author

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.

@HandyHat HandyHat linked a pull request Jan 1, 2023 that will close this issue
@HandyHat
Copy link
Owner

HandyHat commented Jan 1, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants