-
-
Notifications
You must be signed in to change notification settings - Fork 28.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
"""Test diagnostics of Linear Garage Door.""" | ||
|
||
from homeassistant.core import HomeAssistant | ||
|
||
from .util import async_init_integration | ||
|
||
from tests.components.diagnostics import get_diagnostics_for_config_entry | ||
from tests.typing import ClientSessionGenerator | ||
|
||
|
||
async def test_entry_diagnostics( | ||
hass: HomeAssistant, hass_client: ClientSessionGenerator | ||
) -> None: | ||
"""Test config entry diagnostics.""" | ||
entry = await async_init_integration(hass) | ||
result = await get_diagnostics_for_config_entry(hass, hass_client, entry) | ||
|
||
assert result["entry"]["data"] == { | ||
"email": "**REDACTED**", | ||
"password": "**REDACTED**", | ||
"site_id": "test-site-id", | ||
"device_id": "test-uuid", | ||
} | ||
assert result["coordinator_data"] == { | ||
"test1": { | ||
"name": "Test Garage 1", | ||
"subdevices": { | ||
"GDO": {"Open_B": "true", "Open_P": "100"}, | ||
"Light": {"On_B": "true", "On_P": "100"}, | ||
}, | ||
}, | ||
"test2": { | ||
"name": "Test Garage 2", | ||
"subdevices": { | ||
"GDO": {"Open_B": "false", "Open_P": "0"}, | ||
"Light": {"On_B": "false", "On_P": "0"}, | ||
}, | ||
}, | ||
} |