hass-core/tests/components/nuki/mock.py
Pascal Reeb 1af3177466
Fix unique_id of nuki config entry (#62840)
* fix(nuki): fixed naming of nuki integration

* parse_id function

* migration path

* fixes from ci runs

* don't update title if it was changed

* move to dedicated helper

* use dict of params

* Update homeassistant/components/nuki/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-12-27 23:02:48 +01:00

25 lines
496 B
Python

"""Mockup Nuki device."""
from tests.common import MockConfigEntry
NAME = "Nuki_Bridge_75BCD15"
HOST = "1.1.1.1"
MAC = "01:23:45:67:89:ab"
HW_ID = 123456789
ID_HEX = "75BCD15"
MOCK_INFO = {"ids": {"hardwareId": HW_ID}}
async def setup_nuki_integration(hass):
"""Create the Nuki device."""
entry = MockConfigEntry(
domain="nuki",
unique_id=ID_HEX,
data={"host": HOST, "port": 8080, "token": "test-token"},
)
entry.add_to_hass(hass)
return entry