Skip to content

Commit

Permalink
Fix byte issue for py 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsaxon committed Jan 9, 2020
1 parent 882b842 commit 80913c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pysonofflanr3/__init__.py
Expand Up @@ -54,7 +54,7 @@ async def state_callback(device):
__url__ = "https://github.com/mattsaxon/pysonofflan"

# flake8: noqa
from client import SonoffLANModeClient
from discover import Discover
from sonoffdevice import SonoffDevice
from sonoffswitch import SonoffSwitch
from .client import SonoffLANModeClient
from .discover import Discover
from .sonoffdevice import SonoffDevice
from .sonoffswitch import SonoffSwitch
3 changes: 2 additions & 1 deletion pysonofflanr3/sonoffdevice.py
Expand Up @@ -291,7 +291,8 @@ async def handle_message(self, message):

self.message_ping_event.set()

response = json.loads(message)
print(message)
response = json.loads(message.decode('utf-8'))

if self.client.type == b"strip":

Expand Down

0 comments on commit 80913c6

Please sign in to comment.