home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.74k stars 30.45k forks source link

The Riemann Sum integration sensor round 0 is not working #118971

Open ausfas opened 4 months ago

ausfas commented 4 months ago

The problem

The option for configuration variable round doesn't work for 0 value any more to round the value without a decimal point. It has stopped working in the latest release and gives over 20 decimal places. Any other value for round e.g 1, 2 etc works fine. Screenshot_20240606-215839 It was working fine before the latest release.

What version of Home Assistant Core has the issue?

core 2024.6.0

What was the last working version of Home Assistant Core?

core 2024.5.5

What type of installation are you running?

Home Assistant OS

Integration causing the issue

The Riemann Sum integration

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

-  platform: integration
    source: sensor.grid_in
    name: total_grid_in
    unit_prefix: k
    round: 0
    method: left
  - platform: integration
    source: sensor.grid_out
    name: total_grid_out
    unit_prefix: k
    round: 1


### Anything in the logs that might be useful for us?

_No response_

### Additional information

_No response_
home-assistant[bot] commented 4 months ago

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

Code owner commands Code owners of `integration` 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 integration` 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)


integration documentation integration source (message by IssueLinks)

k0rn3l commented 1 month ago

Rounding with '0' decimals stopped working for me too.