New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wait_for_ack: False option for RFLink #17889

Merged
merged 1 commit into from Oct 28, 2018

Conversation

Projects
None yet
6 participants
@emontnemery
Contributor

emontnemery commented Oct 27, 2018

Description:

Fix wait_for_ack: False option for RFLink

Related issue): fixes #17875

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
@houndci-bot

Some files could not be reviewed due to errors:

Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/linters/.local/bin/flake8", line 7, in 
    from flake8.main.cli import main
ModuleNotFoundError: No module named 'flake8'
@javicalle

This comment has been minimized.

Contributor

javicalle commented Oct 27, 2018

Wow, thanks @emontnemery , that's a quick fix.
I have tested your PR and it works without errors in my log.

@@ -492,8 +492,7 @@ def cancel_queued_send_commands(self):
# Rflink protocol/transport handles asynchronous writing of buffer
# to serial/tcp device. Does not wait for command send
# confirmation.
self.hass.async_create_task(self._protocol.send_command(
self._device_id, cmd))
self._protocol.send_command(self._device_id, cmd)

This comment has been minimized.

@balloob

balloob Oct 27, 2018

Member

are you sure about that ? On line 489 it's awaited and since it was passed to create_task, I would expect it to be a coroutine function.

This comment has been minimized.

@emontnemery

emontnemery Oct 27, 2018

Contributor

@balloob It should be fine I think.
On line 489 send_command_ack is called, not send_command.
send_command_ack is a coroutine as you suspect, but send_command is not: https://github.com/aequitas/python-rflink/blob/master/rflink/protocol.py

@MartinHjelmare

Thanks!

@MartinHjelmare MartinHjelmare merged commit 3f3955c into home-assistant:dev Oct 28, 2018

5 checks passed

Hound No violations found. Woof!
WIP ready for review
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 93.225%
Details

@wafflebot wafflebot bot removed the in progress label Oct 28, 2018

@balloob balloob referenced this pull request Nov 9, 2018

Merged

0.82 #18335

@emontnemery emontnemery deleted the emontnemery:rflink_fix_17875 branch Nov 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment