# Path: mysensors/mysensors.py



import asyncio
import logging
from mysensors import mysensors
"""Show how to implement pymysensors async."""



logging.basicConfig(level=logging.DEBUG)


def event(message):
    """Handle mysensors updates."""
    print("sensor_update " + str(message.node_id))


LOOP = asyncio.get_event_loop()
LOOP.set_debug(True)

try:
    # To create a serial gateway.

# Path: mysensors/mysensors.py



# Path: async_main.py
import asyncio
import logging
from mysensors import mysensors

"""Show how to implement pymysensors async."""



logging.basicConfig(level=logging.DEBUG)


def event(message):
    """Handle mysensors updates."""
    print("sensor_update " + str(message.node_id))


LOOP = asyncio.get_event_loop()
LOOP.set_debug(True)

try:
    # To create a serial gateway.

    GATEWAY = mysensors.AsyncSerialGateway(