8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfaf18f commit 28d6203Copy full SHA for 28d6203
homeassistant/components/roomba/diagnostics.py
@@ -0,0 +1,22 @@
1
+"""Diagnostics support for Roomba."""
2
+
3
+from __future__ import annotations
4
5
+from typing import Any
6
7
+from homeassistant.config_entries import ConfigEntry
8
+from homeassistant.core import HomeAssistant
9
10
+from . import roomba_reported_state
11
+from .const import DOMAIN
12
+from .models import RoombaData
13
14
15
+async def async_get_config_entry_diagnostics(
16
+ hass: HomeAssistant, config_entry: ConfigEntry
17
+) -> dict[str, Any]:
18
+ """Return diagnostics for a config entry."""
19
+ domain_data: RoombaData = hass.data[DOMAIN][config_entry.entry_id]
20
+ return {
21
+ "lastCommand": roomba_reported_state(domain_data.roomba).get("lastCommand", {}),
22
+ }
0 commit comments