hass-core/tests/components/litejet/test_diagnostics.py
Jon Caruana 45fde2db4e
Remove hardcoded bits from LiteJet integration (#106281)
Use the new properties from pylitejet v0.6.0.
2023-12-27 15:43:00 +01:00

25 lines
721 B
Python

"""The tests for the litejet component."""
from homeassistant.core import HomeAssistant
from . import async_init_integration
from tests.components.diagnostics import get_diagnostics_for_config_entry
from tests.typing import ClientSessionGenerator
async def test_diagnostics(
hass: HomeAssistant, hass_client: ClientSessionGenerator, mock_litejet
) -> None:
"""Test getting the LiteJet diagnostics."""
config_entry = await async_init_integration(hass)
diag = await get_diagnostics_for_config_entry(hass, hass_client, config_entry)
assert diag == {
"model": "MockJet",
"loads": [1, 2],
"button_switches": [1, 2],
"scenes": [1, 2],
"connected": True,
}