Replace rfxtrx entity events with integration events (#37565)

* Drop per entity events

* Correct linting error

* Drop keys()
This commit is contained in:
Joakim Plate authored and GitHub committed 2020-07-13 02:57:19 +02:00
1 parent d3b47b6d89
commit 87f6b7cdd4
14 files changed
+132 -183

No files matched your search

+6 -1
View File
@@ -4,6 +4,11 @@ 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_add_executor_job(
hass.data[rfxtrx.DATA_RFXOBJECT].event_callback, event,
)
await hass.async_block_till_done()
await hass.async_block_till_done()
return event