Skip to content

Commit

Permalink
Merge pull request #9 from devkid/fix/asyncio-mqtt-0.4.0-payload-brea…
Browse files Browse the repository at this point in the history
…king-change

fix: handling of control messages
  • Loading branch information
gluap committed Jun 30, 2020
2 parents 6836a1c + cd1b993 commit ee938db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyess/essmqtt.py
Expand Up @@ -164,7 +164,7 @@ async def handle_control(client, control, path):
async for msg in messages:
logger.info(f"control message received {msg}")
try:
state = strtobool(msg.decode())
state = strtobool(msg.payload.decode())
await control(state)
except ValueError:
logger.warning(f"ignoring incompatible value {msg} for switching")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -22,7 +22,7 @@
packages=['pyess'],

install_requires=[
'zeroconf', 'requests', 'graphyte', 'aiohttp', 'asyncio-mqtt>=0.3.0', 'ConfigArgParse'
'zeroconf', 'requests', 'graphyte', 'aiohttp', 'asyncio-mqtt>=0.4.0', 'ConfigArgParse'
],

zip_safe=False,
Expand Down

0 comments on commit ee938db

Please sign in to comment.