hass-core/tests/components/rfxtrx/__init__.py
Rob Bierbooms ad5d7ee615
Implement unload entry for rfxtrx integration ()
* Implement unload entry

* Change async_remove to remove

* Pop data from hass.data

* Change sequence order in unload

* Dont unload internal when unload platforms fail
2020-07-21 23:43:05 +02:00

14 lines
392 B
Python

"""Tests for the rfxtrx component."""
from homeassistant.components import rfxtrx
async def _signal_event(hass, packet_id):
event = rfxtrx.get_rfx_object(packet_id)
await hass.async_add_executor_job(
hass.data[rfxtrx.DOMAIN][rfxtrx.DATA_RFXOBJECT].event_callback, event,
)
await hass.async_block_till_done()
await hass.async_block_till_done()
return event