Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pilight/pilight.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import json
import logging

from pilight import protocol_schema


class Client(threading.Thread):

Expand Down Expand Up @@ -103,6 +105,11 @@ def __init__(self, host='127.0.0.1', port=5000, timeout=1,
answer_1, answer_2)

self.callback = None
self.protocol_registry = self._load_protocol_schema()

def _load_protocol_schema(self):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a essential function to be used externally I would remove the _ prefix.

# Use static protocol schema dump until we have PR #322 merged.
return protocol_schema.ProtocolRegistry()

def set_callback(self, function):
"""Function to be called when data is received."""
Expand Down
Loading