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
70.46k stars 29.4k forks source link

Lack of state_class for AdGuard leads to no statistics kept. #99378

Closed dirrgang closed 8 months ago

dirrgang commented 11 months ago

The problem

In reference to #98880 and #98577. I meant to comment on the issues themselves, but they are locked.

The reason I had created the original PR was because I wanted to make a UI card that shows statistics of AdGuard, such as this:

grafik

Without a state_class attribute, the sensors don't store any statistical data, therefore the statistics card cannot be used. (The screenshot was taken on my instance that has the state_class overwritten via customize.yaml.

sensor.tomorrow_io_zuhause_uv_index:
  state_class: measurement

sensor.adguard_home_dns_abfragen:
  state_class: total

sensor.adguard_home_dns_abfragen_blockiert:
  state_class: total

sensor.adguard_home_durchschnittliche_verarbeitungsgeschwindigkeit:
  state_class: measurement

sensor.adguard_home_kindersicherung_blockiert:
  state_class: total

sensor.adguard_home_sichere_suchvorgange_erzwungen:
  state_class: total

sensor.adguard_home_sicheres_surfen_blockiert:
  state_class: total

sensor.adguard_home_sperrverhaltnis_fur_dns_abfragen:
  state_class: measurement

I'm aware that the statistics are moving windows, but rather than moving the state_classes entirely, perhaps state_class: measurement could be used instead?

What version of Home Assistant Core has the issue?

core-2023.8.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

adguard

Link to integration documentation on our website

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

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[bot] commented 11 months ago

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

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

(message by CodeOwnersMention)


adguard documentation adguard source (message by IssueLinks)

issue-triage-workflows[bot] commented 8 months ago

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.