thebino / rki_covid

🦠 Custom integration for Home Assistant to monitor covid numbers provided by Robert-Koch Institut
Apache License 2.0
40 stars 10 forks source link

Feature Request: Enable use of "Statistics Graph" card #67

Closed lacalamine64 closed 2 years ago

lacalamine64 commented 3 years ago

Hi @thebino,

thanks for your awesome integration.

I would like to ask for one feature: I tried to use the "Statistics Graph" card but couldn't select one of your integration's entities. At the bottom of the list was a link to this page: https://www.home-assistant.io/more-info/statistics/

Is it possible for you to enable that? The "Statistics Graph" card has the option to show columns, what I would like to use.

Regards, Stephan

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

matze338 commented 2 years ago

bump 😇

thebino commented 2 years ago

Its working on my side for weeks, please re-check.

Screenshot 2022-02-14 at 02 27 56
- platform: statistics
  name: "Bayern Week incidence over last year"
  entity_id: sensor.bl_bayern_weekincidence
  state_characteristic: mean
matze338 commented 2 years ago

@thebino You using a separate integration (platform: statistics). Its generate a new sensor entity which is statistic graph compatible. For sure it works but you need separate yaml code for each rki sensor.

For example the thermal Comfort integration done this in there own integration platform: https://github.com/dolezsa/thermal_comfort/issues/74

So all sensors from the integration (rki covid numbers) can integrate this feature by his own too, so that you do not need an extra integration with addtitional sensor entities.

thebino commented 2 years ago

@matze338 This was already part of my integration as well: https://github.com/thebino/rki_covid/blob/master/custom_components/rki_covid/sensor.py#L162 as recommended in the official documentation

matze338 commented 2 years ago

@matze338 This was already part of my integration as well: https://github.com/thebino/rki_covid/blob/master/custom_components/rki_covid/sensor.py#L162 as recommended in the official documentation

hm.. than why its not working without an additional sensor? I guess the property _stateclass: measurement is a missing attribute and thats the reason why its not working: image

ThermalComfort Attributes: image