core icon indicating copy to clipboard operation
core copied to clipboard

Compensation integration not supported in statistics graph

Open aykevl opened this issue 1 year ago • 13 comments

The problem

I added a compensation to adjust the temperature of one of my sensors:

compensation:
  temperature_balcony:
    source: "sensor.0xa4c13867c353a9ea_temperature"
    data_points:
      - [0.5, 0]
      - [10.5, 10]
    unit_of_measurement: '°C'
    unique_id: compensation_0xa4c13867c353a9ea_temperature_balcony

I wanted to add it to a statistics graph, but couldn't. The dropdown tells me to show the developers this URL: https://developers.home-assistant.io/docs/core/entity/sensor/#long-term-statistics

What version of Home Assistant Core has the issue?

core-2023.7.1

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

Compensation

Link to integration documentation on our website

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

Diagnostics information

I can share them, but not sure that's useful in this case.

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

aykevl avatar Jul 09 '23 13:07 aykevl

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

Code owner commands

Code owners of compensation 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 compensation Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


compensation documentation compensation source (message by IssueLinks)

home-assistant[bot] avatar Jul 09 '23 13:07 home-assistant[bot]

Same problem here. A workaround is maybe to create a template sensor with "state_class: measurement" that just represents the compensation value. It's just a hassle having to do that for every compensated sensor.

salzrat avatar Jul 14 '23 09:07 salzrat

Yeah, I'm now using a template sensor instead. It would be nice to use Compensation for this instead, as that's what it's meant to be used for (it's easy to make mistakes with templates).

aykevl avatar Jul 14 '23 14:07 aykevl

The integration isn't designed to work with it yet. You can add state_class: measurement and a device_class via customize.yaml to get it to work with statistics.

Petro31 avatar Jul 14 '23 15:07 Petro31

ah, that worked, thank you!

salzrat avatar Jul 14 '23 16:07 salzrat

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.

I have no reason to believe the bug went away.

(Also, please don't use stalebot, it's highly discouraging to contributors).

aykevl avatar Oct 12 '23 17:10 aykevl

  1. it's not a bug. What you're asking for is a feature request.
  2. the stale bot is automatic, this will happen again until I add the new functionality.

Petro31 avatar Oct 13 '23 17:10 Petro31

I just filed a dupe of this: https://github.com/home-assistant/core/issues/103785

Rudd-O avatar Nov 11 '23 10:11 Rudd-O

Compensation sensor should really be smart enough to inherit the device class and state class of the parent sensor. That would be the best fix.

Rudd-O avatar Nov 11 '23 10:11 Rudd-O

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.

Somehow this got corrected in January 2024. This can be closed.

Rudd-O avatar Feb 09 '24 17:02 Rudd-O

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.