# Path: mysensors/const.py
# SYSTEM_CHILD_ID = 255
# 
# Path: mysensors/util.py
# class Registry(dict):
#     """Registry of items."""
# 
#     def register(self, name):
#         """Return decorator to register item with a specific name."""
# 
#         def decorator(func):
#             """Register decorated function."""
#             self[name] = func
#             return func
# 
#         return decorator


import calendar
import logging
import time
from .const import SYSTEM_CHILD_ID
from .util import Registry
        msg.node_id,
        msg.child_id,
        msg.type,
        msg.sub_type,
        msg.payload,
    )
    msg.gateway.alert(msg)
    return msg.copy(
        node_id=255, ack=0, sub_type=msg.gateway.const.Internal.I_DISCOVER, payload=""
    )


@HANDLERS_20.register("I_HEARTBEAT_RESPONSE")
def handle_heartbeat_response(msg):
    """Process an internal heartbeat response message."""
    if not msg.gateway.is_sensor(msg.node_id):
        return None
    handle_smartsleep(msg)
    msg.gateway.sensors[msg.node_id].heartbeat = msg.payload
    msg.gateway.alert(msg)
    return None


@HANDLERS_20.register("I_DISCOVER_RESPONSE")
def handle_discover_response(msg):  # pylint: disable=useless-return
    """Process an internal discover response message."""
    msg.gateway.is_sensor(msg.node_id)
    return None



# Path: mysensors/const.py
# SYSTEM_CHILD_ID = 255
# 
# Path: mysensors/util.py
# class Registry(dict):
#     """Registry of items."""
# 
#     def register(self, name):
#         """Return decorator to register item with a specific name."""
# 
#         def decorator(func):
#             """Register decorated function."""
#             self[name] = func
#             return func
# 
#         return decorator


# Path: mysensors/handler.py
import calendar
import logging
import time
from .const import SYSTEM_CHILD_ID
from .util import Registry

        msg.node_id,
        msg.child_id,
        msg.type,
        msg.sub_type,
        msg.payload,
    )
    msg.gateway.alert(msg)
    return msg.copy(
        node_id=255, ack=0, sub_type=msg.gateway.const.Internal.I_DISCOVER, payload=""
    )


@HANDLERS_20.register("I_HEARTBEAT_RESPONSE")
def handle_heartbeat_response(msg):
    """Process an internal heartbeat response message."""
    if not msg.gateway.is_sensor(msg.node_id):
        return None
    handle_smartsleep(msg)
    msg.gateway.sensors[msg.node_id].heartbeat = msg.payload
    msg.gateway.alert(msg)
    return None


@HANDLERS_20.register("I_DISCOVER_RESPONSE")
def handle_discover_response(msg):  # pylint: disable=useless-return
    """Process an internal discover response message."""
    msg.gateway.is_sensor(msg.node_id)
    return None



HANDLERS_22 = Registry()