Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

adding Current Summation Delivered to process_update #3

Merged

Conversation

imthefrizzlefry
Copy link
Contributor

A bug was introduced that created a Summation Delivered sensor, but the sensor state is never updated.

A bug was introduced that created a Summation Delivered sensor, but the sensor state is never updated.
@ryanwinter ryanwinter merged commit 017c2c2 into ryanwinter:main Apr 15, 2022
@imthefrizzlefry
Copy link
Contributor Author

sorry to make such a bone-headed mistake by introducing a bug like this on my first contribution. I developed it on my HA instance, but forgot to commit this last bit to the previous PR. I guess I am still trying to get a good workflow for developing on HA.

@ryanwinter
Copy link
Owner

Lol, no problems, I'm far from an expert here and I have to say the whole integration process is pretty convoluted. I was actually staring at my screen waiting for that sensor to update and wondering why it wasnt :D

@imthefrizzlefry
Copy link
Contributor Author

I am sorry to say I made one more mistake. let me finish testing before I fix it, but I just updated based on response.summation_delivered, but it looks like we want response.delivered because it adjusts by the offset. I just mistaked the comma for a period when I was checking on local

@ryanwinter
Copy link
Owner

ryanwinter commented Apr 15, 2022

I did notice a very high number.

The other thing here is that the state_class is of type MEASUREMENT, and I was wondering if it should by type TOTAL?

https://developers.home-assistant.io/blog/2021/09/20/state_class_total/

@imthefrizzlefry imthefrizzlefry deleted the enableSummationDelivered branch April 15, 2022 23:30
@imthefrizzlefry
Copy link
Contributor Author

Thanks for pointing that out. After reading that post, think it should be TOTAL_INCREASING. As this number should always be a positive number that increases over time (both for delivered and received values).

The only way it would decrease is if an individual were to move, in which case, Home Assistant would still calculate the sum statistic to cover the total increase over time across multiple houses. At least, that's how I interpreted that post, would you agree?

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

Successfully merging this pull request may close these issues.

None yet

2 participants