python-openhab icon indicating copy to clipboard operation
python-openhab copied to clipboard

added functionality to receive Events from Openhab and added methods to create and delete openhab items

Open galexey opened this issue 4 years ago • 6 comments

I also created som testcases for the new functionality.

galexey avatar Dec 13 '20 13:12 galexey

Hi @galexey Thanks for your PR! That is quite a big one to review though ;-) Could you please make sure to rebase from master and cleanup your code according to pylint, flake8 and mypy as much as possible.

What are you thoughts on using aiohttp-sse instead of threading+sseclient?

sim0nx avatar Dec 13 '20 23:12 sim0nx

Hi! Jep, this one grew quite big, sorry. I merged your changes and did some major cleanup (also applied python naming style) I haven´t used aiohttp-sse yet, but it looks nice. I might get back to your proposal and have a deeper look into it later this month.

galexey avatar Dec 14 '20 14:12 galexey

I need to rework Commandhandling a bit. expect another commit soon.

galexey avatar Dec 16 '20 09:12 galexey

A couple of change requests:

  • please do fix linting issues (too many newlines, no newline at end of file etc)
  • do not use data_type in docstrings. either data type or just leave type please
  • could you please strip the SSE stuff into a separate pull request so that we can differentiate between code reworks, new type support, more complete API support ... and the event stream handling ?
  • please also fix the tests which currently fail ... there are at least import errors

Thanks

sim0nx avatar Dec 28 '20 00:12 sim0nx

Hi! I cleaned the code as much as I cound and found reasonable. the suggested aiohttp_sse_client works quite well and is a cleaner approach - thx for the hint.

However I can not split up the PRs to isolate the SSE-stuff, I had to change a lot of things in client, items and types modules for sse-implementation.

galexey avatar Dec 30 '20 09:12 galexey

Hi, I cloned your changes into a local branch and spend some time cleaning things up a bit, namely docstrings and typing.

Could you please rebase your PR on that branch ( https://github.com/sim0nx/python-openhab/tree/galexey_pr ) ... if required open a new PR. I think it is important to have cleanly typed code as much as possible.

I would also appreciate docstrings for methods which currently have none :-)...

Thanks

sim0nx avatar Jan 03 '21 23:01 sim0nx