init home-assistant

This commit is contained in:
2026-11-19 15:15:32 -05:00
parent 2e81d9d300
commit feec6ef9fb
19230 changed files with 3335526 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
"""Tests for binary sensor entities provided by the Tailwind integration."""
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.core import HomeAssistant
from homeassistant.helpers import device_registry as dr, entity_registry as er
pytestmark = pytest.mark.usefixtures("init_integration")
@pytest.mark.parametrize(
"entity_id",
[
"binary_sensor.door_1_operational_problem",
"binary_sensor.door_2_operational_problem",
],
)
async def test_number_entities(
hass: HomeAssistant,
device_registry: dr.DeviceRegistry,
entity_registry: er.EntityRegistry,
snapshot: SnapshotAssertion,
entity_id: str,
) -> None:
"""Test binary sensor entities provided by the Tailwind integration."""
assert (state := hass.states.get(entity_id))
assert snapshot == state
assert (entity_entry := entity_registry.async_get(state.entity_id))
assert snapshot == entity_entry
assert entity_entry.device_id
assert (device_entry := device_registry.async_get(entity_entry.device_id))
assert snapshot == device_entry