Files
project-work/home-assistant/tests/components/flexit_bacnet/test_sensor.py
2026-11-19 15:15:32 -05:00

28 lines
846 B
Python

"""Tests for the Flexit Nordic (BACnet) sensor entities."""
from unittest.mock import AsyncMock
from syrupy.assertion import SnapshotAssertion
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from . import setup_with_selected_platforms
from tests.common import MockConfigEntry, snapshot_platform
async def test_sensors(
hass: HomeAssistant,
snapshot: SnapshotAssertion,
entity_registry: er.EntityRegistry,
mock_flexit_bacnet: AsyncMock,
mock_config_entry: MockConfigEntry,
) -> None:
"""Test sensor states are correctly collected from library."""
await setup_with_selected_platforms(hass, mock_config_entry, [Platform.SENSOR])
await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id)