mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 20:40:18 +00:00
Add diagnostics to AirNow (#79904)
This commit is contained in:
43
tests/components/airnow/test_diagnostics.py
Normal file
43
tests/components/airnow/test_diagnostics.py
Normal file
@@ -0,0 +1,43 @@
|
||||
"""Test AirNow diagnostics."""
|
||||
from homeassistant.components.diagnostics import REDACTED
|
||||
|
||||
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
||||
|
||||
|
||||
async def test_entry_diagnostics(hass, config_entry, hass_client, setup_airnow):
|
||||
"""Test config entry diagnostics."""
|
||||
assert await get_diagnostics_for_config_entry(hass, hass_client, config_entry) == {
|
||||
"entry": {
|
||||
"entry_id": config_entry.entry_id,
|
||||
"version": 1,
|
||||
"domain": "airnow",
|
||||
"title": REDACTED,
|
||||
"data": {
|
||||
"api_key": REDACTED,
|
||||
"latitude": REDACTED,
|
||||
"longitude": REDACTED,
|
||||
"radius": 75,
|
||||
},
|
||||
"options": {},
|
||||
"pref_disable_new_entities": False,
|
||||
"pref_disable_polling": False,
|
||||
"source": "user",
|
||||
"unique_id": REDACTED,
|
||||
"disabled_by": None,
|
||||
},
|
||||
"data": {
|
||||
"O3": 0.048,
|
||||
"PM2.5": 8.9,
|
||||
"HourObserved": 15,
|
||||
"DateObserved": "2020-12-20",
|
||||
"StateCode": REDACTED,
|
||||
"ReportingArea": REDACTED,
|
||||
"Latitude": REDACTED,
|
||||
"Longitude": REDACTED,
|
||||
"PM10": 12,
|
||||
"AQI": 44,
|
||||
"Category.Number": 1,
|
||||
"Category.Name": "Good",
|
||||
"Pollutant": "O3",
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user