2022-10-18 16:25:07 +00:00
|
|
|
"""Test Enphase Envoy diagnostics."""
|
|
|
|
from homeassistant.components.diagnostics import REDACTED
|
2023-02-13 08:45:11 +00:00
|
|
|
from homeassistant.core import HomeAssistant
|
2022-10-18 16:25:07 +00:00
|
|
|
|
|
|
|
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
2023-02-13 08:45:11 +00:00
|
|
|
from tests.typing import ClientSessionGenerator
|
2022-10-18 16:25:07 +00:00
|
|
|
|
|
|
|
|
2023-02-13 08:45:11 +00:00
|
|
|
async def test_entry_diagnostics(
|
|
|
|
hass: HomeAssistant,
|
|
|
|
config_entry,
|
|
|
|
hass_client: ClientSessionGenerator,
|
|
|
|
setup_enphase_envoy,
|
|
|
|
) -> None:
|
2022-10-18 16:25:07 +00:00
|
|
|
"""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": "enphase_envoy",
|
|
|
|
"title": REDACTED,
|
|
|
|
"data": {
|
|
|
|
"host": "1.1.1.1",
|
|
|
|
"name": REDACTED,
|
|
|
|
"username": REDACTED,
|
|
|
|
"password": REDACTED,
|
2023-08-06 00:51:19 +00:00
|
|
|
"token": REDACTED,
|
2022-10-18 16:25:07 +00:00
|
|
|
},
|
|
|
|
"options": {},
|
|
|
|
"pref_disable_new_entities": False,
|
|
|
|
"pref_disable_polling": False,
|
|
|
|
"source": "user",
|
|
|
|
"unique_id": REDACTED,
|
|
|
|
"disabled_by": None,
|
|
|
|
},
|
2023-08-05 23:33:16 +00:00
|
|
|
"data": {"varies_by": "firmware_version"},
|
2022-10-18 16:25:07 +00:00
|
|
|
}
|