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

suez_water doesn't implement state_class #107858

Open
ybizeul opened this issue Jan 12, 2024 · 14 comments · May be fixed by #131166
Open

suez_water doesn't implement state_class #107858

ybizeul opened this issue Jan 12, 2024 · 14 comments · May be fixed by #131166

Comments

@ybizeul
Copy link

ybizeul commented Jan 12, 2024

The problem

If we want long term statistics for water, the documentation says it has to implement state_class.

It would be nice to have state_class = total_increasing implemented here.

What version of Home Assistant Core has the issue?

core-2024.1.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

suez_water

Link to integration documentation on our website

https://www.home-assistant.io/integrations/suez_water/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @ooii, mind taking a look at this issue as it has been labeled with an integration (suez_water) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of suez_water can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign suez_water Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


suez_water documentation
suez_water source
(message by IssueLinks)

@ybizeul
Copy link
Author

ybizeul commented Jan 12, 2024

To work around this I have the following template sensor (that also converts to m3) :

template:
  - sensor:
      - name: water
        unit_of_measurement: "m.."
        state: "{{ states('sensor.suez_water_client') | float * 0.001 }}"
        device_class: water
        state_class: total_increasing
        unique_id: water

I can see this one in the selection list for Energy sensor

@pouilld
Copy link

pouilld commented Jan 17, 2024

Thanks a lot for this solution.
As a newbie, could you please indicate if this template has to be included right away in the configuration.yam file.
I noticed that the Suez integration fail often to receive data from "toutsurmoneau" Suez site and need to be reloaded in order to receive new data.
Is there also a way to set the frequency for the reload of data ?
Thanks for your help,

@jiquem
Copy link

jiquem commented Jan 20, 2024

Hello,

@ybizeul thanks for sharing your configuration. Regarding the unit_of_measurement, it should be m³ to have it working IMHO.
However even by doing that I have this error message in the energy dashboard "statistics_not_defined sensor.water"

@ybizeul
Copy link
Author

ybizeul commented Jan 21, 2024

It is m3 (exponent) but is displayed as two dots probably because of utf8 terminal settings.

@joostlek
Copy link
Member

It should not get a state class since the value of the sensor is the value of yesterday. Instead we have some integrations that can load older data as statistics, it should do that

@ybizeul
Copy link
Author

ybizeul commented Jan 21, 2024

Thanks for clarifying ! Hopefully the author will be able to implement that

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@jiquem
Copy link

jiquem commented Apr 20, 2024

It's not working

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@WebSpider
Copy link
Contributor

Unstale

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@WebSpider
Copy link
Contributor

Unstale

@github-actions github-actions bot removed the stale label Oct 21, 2024
@jb101010-2
Copy link
Contributor

Hi,
I'm coming a bit late to this but I have started to make some changes to suez_water integration.

I should be addressing this in future improvments.
I have experimented a bit and I'm planning to implement it like @joostlek said by storing directly data in statistics.

I'll keep you updated as I move forward with this.

@jb101010-2 jb101010-2 linked a pull request Nov 21, 2024 that will close this issue
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants