async def async_send_data(data_items, queue): for item in data_items: await asyncio.sleep(item.delay) _LOGGER_MESSAGES.debug("RX: %s", item.data.hex()) await queue.put(item.data)
async def async_send_topics(topic_items): for item in topic_items: await asyncio.sleep(item.delay) _LOGGER_MESSAGES.debug("RX: %s %s", item.topic, item.kwargs) pub.sendMessage(item.topic, **item.kwargs)