* Switch to dispatcher * Adjust tests for dispatcher * Store device in sensor * Move state application into binary sensor entity class * Move more specifics into per platform classes * Should not apply event in init of sensor * Switch to call_later * Make apply_event public * No point in slugifying debug logs * Adjust error in off delay and event * Make sure we match with masked id
10 lines
305 B
Python
10 lines
305 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)
|
|
hass.helpers.dispatcher.async_dispatcher_send(rfxtrx.SIGNAL_EVENT, event)
|
|
await hass.async_block_till_done()
|
|
return event
|