hass-core/tests/components/roborock/test_vacuum.py

20 lines
599 B
Python
Raw Normal View History

Add new Roborock Integration (#89456) * init roborock commit * init commit of roborock * removed some non-vacuum related code * removed some non-needed constants * removed translations * removed options flow * removed manual control * remove password login * removed go-to * removed unneeded function and improved device_stat * removed utils as it is unused * typing changes in vacuum.py * fixed test patch paths * removed unneeded records * removing unneeded code in tests * remove password from strings * removed maps in code * changed const, reworked functions * remove menu * fixed tests * 100% code coverage config_flow * small changes * removed unneeded patch * bump to 0.1.7 * removed services * removed extra functions and mop * add () to configEntryNotReady * moved coordinator into seperate file * update roborock testing * removed stale options code * normalize username for unique id * removed unneeded variables * fixed linter problems * removed stale comment * additional pr changes * simplify config_flow * fix config flow test * Apply suggestions from code review Co-authored-by: Allen Porter <allen.porter@gmail.com> * First pass at resolving PR comments * reworked config flow * moving vacuum attr * attempt to clean up conflig flow more * update package and use offline functionality * Fixed errors and fan bug * rework model and some other small changes * bump version * used default factory * moved some client creation into coord * fixed patch * Update homeassistant/components/roborock/coordinator.py Co-authored-by: Allen Porter <allen.porter@gmail.com> * moved async functions into gather * reworked gathers * removed random line * error catch if networking doesn't exist or timeout * bump to 0.6.5 * fixed mocked data reference url * change checking if we have no network information Co-authored-by: Allen Porter <allen.porter@gmail.com> --------- Co-authored-by: Allen Porter <allen.porter@gmail.com> Co-authored-by: Allen Porter <allen@thebends.org>
2023-04-20 10:02:58 -04:00
"""Tests for Roborock vacuums."""
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from .common import setup_platform
ENTITY_ID = "vacuum.roborock_s7_maxv"
DEVICE_ID = "abc123"
async def test_registry_entries(hass: HomeAssistant, bypass_api_fixture) -> None:
"""Tests devices are registered in the entity registry."""
await setup_platform(hass, Platform.VACUUM)
entity_registry = er.async_get(hass)
entry = entity_registry.async_get(ENTITY_ID)
assert entry.unique_id == DEVICE_ID