mirror of
https://github.com/home-assistant/core.git
synced 2026-08-24 10:13:52 -05:00
24 lines
638 B
Python
24 lines
638 B
Python
"""Diagnostics support for Whois."""
|
|
|
|
from typing import Any
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from .coordinator import WhoisConfigEntry
|
|
|
|
|
|
async def async_get_config_entry_diagnostics(
|
|
hass: HomeAssistant, entry: WhoisConfigEntry
|
|
) -> dict[str, Any]:
|
|
"""Return diagnostics for a config entry."""
|
|
if (data := entry.runtime_data.data) is None:
|
|
return {}
|
|
return {
|
|
"creation_date": data.creation_date,
|
|
"expiration_date": data.expiration_date,
|
|
"last_updated": data.updated_date,
|
|
"status": data.status,
|
|
"statuses": data.statuses,
|
|
"dnssec": data.dnssec,
|
|
}
|