mirror of
https://github.com/home-assistant/core.git
synced 2026-10-11 08:48:45 -04:00
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
23 lines
755 B
Python
23 lines
755 B
Python
"""Tests for the WeatherFlow integration."""
|
|
|
|
from pyweatherflowudp.aioudp import LocalEndpoint
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from tests.common import MockConfigEntry, load_fixture_bytes
|
|
|
|
HUB_ADDRESS = ("192.0.2.1", 50222)
|
|
|
|
|
|
async def setup_integration(
|
|
hass: HomeAssistant, config_entry: MockConfigEntry, endpoint: LocalEndpoint
|
|
) -> None:
|
|
"""Set up the integration and receive the UDP packets of a Tempest."""
|
|
config_entry.add_to_hass(hass)
|
|
await hass.config_entries.async_setup(config_entry.entry_id)
|
|
await hass.async_block_till_done()
|
|
|
|
for fixture in ("device.json", "obs_st.json"):
|
|
endpoint.feed_datagram(load_fixture_bytes(fixture, "weatherflow"), HUB_ADDRESS)
|
|
await hass.async_block_till_done()
|