示例#1
0
 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)
示例#2
0
 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)