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:
Air Quality
Particulate Matter
Volatile Organic Compounds
Carbon Monoxide
Temperature
Humidity
To Reproduce
Go to a dashboard
Click on 'Add Card'
Under the "By Card" tab, scroll down to and click on "Statistics graph"
Search for the sensor entity of any of the listed AQM sensors (e.g. "Particulate Matter")
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
System details
Home-assistant (version): 2024.4.4
alexa_media (version from const.py or HA startup): v4.9.2
alexapy (version from pip show alexapy or HA startup):
Amazon 2FA is enabled (y/n). <!---We will not debug login issues if unanswered--->: y
Logs
Please provide logs.
I don't believe these are relevant. Happy to provide if necessary/requested.
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."
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
Expected behavior
A graph of Min, Mean, and Max values for every hour of recent sensor (e.g. Particulate Matter) measurements should appear.
Screenshots
System details
const.py
or HA startup): v4.9.2pip show alexapy
or HA startup):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."