python-openhab
python-openhab copied to clipboard
added functionality to receive Events from Openhab and added methods to create and delete openhab items
I also created som testcases for the new functionality.
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?
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.
I need to rework Commandhandling a bit. expect another commit soon.
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
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.
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