alandtse / alexa_media_player

This is a custom component to allow control of Amazon Alexa devices in Home Assistant using the unofficial Alexa API.
Apache License 2.0
1.36k stars 263 forks source link

AQM (Echo device) sensor entities are not properly identified to allow for statistics #2237

Open drew-hill opened 2 months ago

drew-hill commented 2 months ago

Describe the bug

The Echo device "Air Quality Monitor" (AQM) accurately captures the following sensors (bravo/brava!), but does not properly identify them as statistics, resulting in an inability to graph them under a standard Home Assistant statistics graph card:

To Reproduce

  1. Go to a dashboard
  2. Click on 'Add Card'
  3. Under the "By Card" tab, scroll down to and click on "Statistics graph"
  4. Search for the sensor entity of any of the listed AQM sensors (e.g. "Particulate Matter")
  5. Observe that the graph preview states "No statistics found."

Expected behavior

A graph of Min, Mean, and Max values for every hour of recent sensor (e.g. Particulate Matter) measurements should appear.

Screenshots

image

System details

Logs Please provide logs. I don't believe these are relevant. Happy to provide if necessary/requested.

Additional context

Please see: https://developers.home-assistant.io/docs/core/entity/sensor/#long-term-statistics

The issue may lie in state classes: "Home Assistant has support for storing sensors as long-term statistics if the entity has the right properties. To opt-in for statistics, the sensor must have state_class set to one of the valid state classes: measurement, total or total_increasing. For certain device classes, the unit of the statistics is normalized to for example make it possible to plot several sensors in a single graph."

github-actions[bot] commented 1 week ago

The issue has received no activity for 60 days and will be closed in a week.