-
-
Notifications
You must be signed in to change notification settings - Fork 37.3k
Expand file tree
/
Copy pathdiagnostics.py
More file actions
23 lines (18 loc) · 741 Bytes
/
diagnostics.py
File metadata and controls
23 lines (18 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"""Diagnostics platform for CentriConnect/MyPropane API integration."""
from typing import Any
from homeassistant.core import HomeAssistant
from . import CentriConnectConfigEntry
async def async_get_config_entry_diagnostics(
hass: HomeAssistant, entry: CentriConnectConfigEntry
) -> dict[str, Any]:
"""Return diagnostics for the provided config entry."""
coord = entry.runtime_data
return {
"device_info": {
"device_id": coord.device_info.device_id,
"device_name": coord.device_info.device_name,
"hardware_version": coord.device_info.hardware_version,
"lte_version": coord.device_info.lte_version,
},
"tank_data": coord.data.raw_data.copy(),
}