# Path: mysensors/const_21.py
# class Internal(BaseConst):
#     I_BATTERY_LEVEL = 0
#     I_TIME = 1
#     I_VERSION = 2
#     I_ID_REQUEST = 3
#     I_ID_RESPONSE = 4
#     I_INCLUSION_MODE = 5
#     I_CONFIG = 6
#     I_FIND_PARENT_REQUEST = 7
#     I_FIND_PARENT = 7  # alias from version 2.0
#     I_FIND_PARENT_RESPONSE = 8
#     I_LOG_MESSAGE = 9
#     I_CHILDREN = 10
#     I_SKETCH_NAME = 11
#     I_SKETCH_VERSION = 12
#     I_REBOOT = 13
#     I_GATEWAY_READY = 14
#     I_SIGNING_PRESENTATION = 15
#     I_REQUEST_SIGNING = 15  # alias from version 1.5
#     I_NONCE_REQUEST = 16
#     I_GET_NONCE = 16  # alias from version 1.5
#     I_NONCE_RESPONSE = 17
#     I_GET_NONCE_RESPONSE = 17  # alias from version 1.5
#     I_HEARTBEAT_REQUEST = 18
#     I_HEARTBEAT = 18  # alias from version 2.0
#     I_PRESENTATION = 19
#     I_DISCOVER_REQUEST = 20
#     I_DISCOVER = 20  # alias from version 2.0
#     I_DISCOVER_RESPONSE = 21
#     I_HEARTBEAT_RESPONSE = 22
#     I_LOCKED = 23
#     I_PING = 24  # Ping sent to node, payload incremental hop counter
#     I_PONG = 25
#     I_REGISTRATION_REQUEST = 26  # Register request to GW
#     I_REGISTRATION_RESPONSE = 27  # Register response from GW
#     I_DEBUG = 28  # Debug message
# VALID_MESSAGE_TYPES = {
#     MessageType.presentation: list(Presentation),
#     MessageType.set: list(SetReq),
#     MessageType.req: list(SetReq),
#     MessageType.internal: list(Internal),
#     MessageType.stream: list(Stream),
# }
# VALID_INTERNAL = dict(VALID_INTERNAL)
# VALID_PAYLOADS = {
#     MessageType.presentation: VALID_PRESENTATION,
#     MessageType.set: VALID_SETREQ,
#     MessageType.req: {member: "" for member in list(SetReq)},
#     MessageType.internal: VALID_INTERNAL,
#     MessageType.stream: VALID_STREAM,
# }
# 
# Path: mysensors/handler.py
# HANDLERS_22 = Registry()


import voluptuous as vol
from mysensors.const_21 import (  # noqa: F401
    MAX_NODE_ID,
    VALID_INTERNAL,
    VALID_PRESENTATION,
    VALID_SETREQ,
    VALID_STREAM,
    VALID_TYPES,
    BaseConst,
    MessageType,
    Presentation,
    SetReq,
    Stream,
)
from .handler import HANDLERS_22
    I_NONCE_REQUEST = 16
    I_GET_NONCE = 16  # alias from version 1.5
    # Payload is nonce data.
    I_NONCE_RESPONSE = 17
    I_GET_NONCE_RESPONSE = 17  # alias from version 1.5
    I_HEARTBEAT_REQUEST = 18
    I_HEARTBEAT = 18  # alias from version 2.0
    I_PRESENTATION = 19
    I_DISCOVER_REQUEST = 20
    I_DISCOVER = 20  # alias from version 2.0
    I_DISCOVER_RESPONSE = 21
    I_HEARTBEAT_RESPONSE = 22
    # Node is locked (reason in string-payload).
    I_LOCKED = 23
    I_PING = 24  # Ping sent to node, payload incremental hop counter
    # In return to ping, sent back to sender, payload incremental hop counter
    I_PONG = 25
    I_REGISTRATION_REQUEST = 26  # Register request to GW
    I_REGISTRATION_RESPONSE = 27  # Register response from GW
    I_DEBUG = 28  # Debug message
    I_SIGNAL_REPORT_REQUEST = 29  # Device signal strength request
    I_SIGNAL_REPORT_REVERSE = 30  # Internal
    I_SIGNAL_REPORT_RESPONSE = 31  # Device signal strength response (RSSI)
    I_PRE_SLEEP_NOTIFICATION = 32  # Message sent before node is going to sleep
    I_POST_SLEEP_NOTIFICATION = 33  # Message sent after node woke up


VALID_MESSAGE_TYPES = {
    MessageType.presentation: list(Presentation),
    MessageType.set: list(SetReq),

# Path: mysensors/const_21.py
# class Internal(BaseConst):
#     I_BATTERY_LEVEL = 0
#     I_TIME = 1
#     I_VERSION = 2
#     I_ID_REQUEST = 3
#     I_ID_RESPONSE = 4
#     I_INCLUSION_MODE = 5
#     I_CONFIG = 6
#     I_FIND_PARENT_REQUEST = 7
#     I_FIND_PARENT = 7  # alias from version 2.0
#     I_FIND_PARENT_RESPONSE = 8
#     I_LOG_MESSAGE = 9
#     I_CHILDREN = 10
#     I_SKETCH_NAME = 11
#     I_SKETCH_VERSION = 12
#     I_REBOOT = 13
#     I_GATEWAY_READY = 14
#     I_SIGNING_PRESENTATION = 15
#     I_REQUEST_SIGNING = 15  # alias from version 1.5
#     I_NONCE_REQUEST = 16
#     I_GET_NONCE = 16  # alias from version 1.5
#     I_NONCE_RESPONSE = 17
#     I_GET_NONCE_RESPONSE = 17  # alias from version 1.5
#     I_HEARTBEAT_REQUEST = 18
#     I_HEARTBEAT = 18  # alias from version 2.0
#     I_PRESENTATION = 19
#     I_DISCOVER_REQUEST = 20
#     I_DISCOVER = 20  # alias from version 2.0
#     I_DISCOVER_RESPONSE = 21
#     I_HEARTBEAT_RESPONSE = 22
#     I_LOCKED = 23
#     I_PING = 24  # Ping sent to node, payload incremental hop counter
#     I_PONG = 25
#     I_REGISTRATION_REQUEST = 26  # Register request to GW
#     I_REGISTRATION_RESPONSE = 27  # Register response from GW
#     I_DEBUG = 28  # Debug message
# VALID_MESSAGE_TYPES = {
#     MessageType.presentation: list(Presentation),
#     MessageType.set: list(SetReq),
#     MessageType.req: list(SetReq),
#     MessageType.internal: list(Internal),
#     MessageType.stream: list(Stream),
# }
# VALID_INTERNAL = dict(VALID_INTERNAL)
# VALID_PAYLOADS = {
#     MessageType.presentation: VALID_PRESENTATION,
#     MessageType.set: VALID_SETREQ,
#     MessageType.req: {member: "" for member in list(SetReq)},
#     MessageType.internal: VALID_INTERNAL,
#     MessageType.stream: VALID_STREAM,
# }
# 
# Path: mysensors/handler.py
# HANDLERS_22 = Registry()


# Path: mysensors/const_22.py
import voluptuous as vol
from mysensors.const_21 import (  # noqa: F401
    MAX_NODE_ID,
    VALID_INTERNAL,
    VALID_PRESENTATION,
    VALID_SETREQ,
    VALID_STREAM,
    VALID_TYPES,
    BaseConst,
    MessageType,
    Presentation,
    SetReq,
    Stream,
)
from .handler import HANDLERS_22

    I_NONCE_REQUEST = 16
    I_GET_NONCE = 16  # alias from version 1.5
    # Payload is nonce data.
    I_NONCE_RESPONSE = 17
    I_GET_NONCE_RESPONSE = 17  # alias from version 1.5
    I_HEARTBEAT_REQUEST = 18
    I_HEARTBEAT = 18  # alias from version 2.0
    I_PRESENTATION = 19
    I_DISCOVER_REQUEST = 20
    I_DISCOVER = 20  # alias from version 2.0
    I_DISCOVER_RESPONSE = 21
    I_HEARTBEAT_RESPONSE = 22
    # Node is locked (reason in string-payload).
    I_LOCKED = 23
    I_PING = 24  # Ping sent to node, payload incremental hop counter
    # In return to ping, sent back to sender, payload incremental hop counter
    I_PONG = 25
    I_REGISTRATION_REQUEST = 26  # Register request to GW
    I_REGISTRATION_RESPONSE = 27  # Register response from GW
    I_DEBUG = 28  # Debug message
    I_SIGNAL_REPORT_REQUEST = 29  # Device signal strength request
    I_SIGNAL_REPORT_REVERSE = 30  # Internal
    I_SIGNAL_REPORT_RESPONSE = 31  # Device signal strength response (RSSI)
    I_PRE_SLEEP_NOTIFICATION = 32  # Message sent before node is going to sleep
    I_POST_SLEEP_NOTIFICATION = 33  # Message sent after node woke up


VALID_MESSAGE_TYPES = {
    MessageType.presentation: list(Presentation),
    MessageType.set: list(SetReq),

    MessageType.req: list(SetReq),