Set Matter battery sensors as diagnostic (#95794)
* Set matter battery sensor to diagnostic * Update tests * Use new eve contact sensor dump across the board * Assert entity category * Complete typing
This commit is contained in:
parent
6964a2112a
commit
02192ddf82
8 changed files with 455 additions and 120 deletions
|
@ -5,12 +5,15 @@ import asyncio
|
|||
from collections.abc import AsyncGenerator, Generator
|
||||
from unittest.mock import AsyncMock, MagicMock, patch
|
||||
|
||||
from matter_server.client.models.node import MatterNode
|
||||
from matter_server.common.const import SCHEMA_VERSION
|
||||
from matter_server.common.models import ServerInfoMessage
|
||||
import pytest
|
||||
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
from .common import setup_integration_with_node_fixture
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
|
||||
MOCK_FABRIC_ID = 12341234
|
||||
|
@ -210,3 +213,21 @@ def update_addon_fixture() -> Generator[AsyncMock, None, None]:
|
|||
"homeassistant.components.hassio.addon_manager.async_update_addon"
|
||||
) as update_addon:
|
||||
yield update_addon
|
||||
|
||||
|
||||
@pytest.fixture(name="door_lock")
|
||||
async def door_lock_fixture(
|
||||
hass: HomeAssistant, matter_client: MagicMock
|
||||
) -> MatterNode:
|
||||
"""Fixture for a door lock node."""
|
||||
return await setup_integration_with_node_fixture(hass, "door-lock", matter_client)
|
||||
|
||||
|
||||
@pytest.fixture(name="eve_contact_sensor_node")
|
||||
async def eve_contact_sensor_node_fixture(
|
||||
hass: HomeAssistant, matter_client: MagicMock
|
||||
) -> MatterNode:
|
||||
"""Fixture for a contact sensor node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "eve-contact-sensor", matter_client
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue