hass-core/tests/components/nuki/mock.py
Paulus Schoutsen a4d9019ffc
Refactor persistent notification to no longer route all data via a service (#57157)
* Convert persistent notification tests to async

* Create/dismiss persistent notifications in exposed functions, not service calls

* Fix notify persistent_notification

* Remove setting up persistent_notification

* Drop more setups

* Empty methods

* Undeprecate sync methods because too big task

* Fix setup clearing notifications

* Fix a bunch of tests

* Fix more tests

* Uno mas

* Test persistent notification events

* Clean up stale comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 12:58:00 +02:00

24 lines
476 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
MOCK_INFO = {"ids": {"hardwareId": HW_ID}}
async def setup_nuki_integration(hass):
"""Create the Nuki device."""
entry = MockConfigEntry(
domain="nuki",
unique_id=HW_ID,
data={"host": HOST, "port": 8080, "token": "test-token"},
)
entry.add_to_hass(hass)
return entry