Hardware integration MVP (#71677)

This commit is contained in:
Erik Montnemery
2022-05-25 20:39:15 +02:00
committed by GitHub
parent f166fc009a
commit 2bc093a04d
22 changed files with 535 additions and 3 deletions

View File

@@ -0,0 +1,18 @@
"""Test the hardware websocket API."""
from homeassistant.components.hardware.const import DOMAIN
from homeassistant.core import HomeAssistant
from homeassistant.setup import async_setup_component
async def test_board_info(hass: HomeAssistant, hass_ws_client) -> None:
"""Test we can get the board info."""
assert await async_setup_component(hass, DOMAIN, {})
client = await hass_ws_client(hass)
await client.send_json({"id": 1, "type": "hardware/info"})
msg = await client.receive_json()
assert msg["id"] == 1
assert msg["success"]
assert msg["result"] == {"hardware": []}