-
Notifications
You must be signed in to change notification settings - Fork 13
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
✨ [feature] Add support for Temperature
sensor
#100
Conversation
Just saw that the group should probably be Temperature with capital T. From my zone_list in the INFO event:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your contribution! And for your patience!
Just a few comments below :)
We're also missing a test in tests/integration/test_qolsys_events.py (e.g. https://github.com/XaF/qolsysgw/pull/93/files#diff-6332c8d6f4e44732305529e69c856d16a7a14d452704fe15fdacab145e0387c8)
Co-authored-by: Raphaël Beamonte <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few other updates!
I approved the workflow so you can see the current state of the tests: https://github.com/XaF/qolsysgw/actions/runs/4561734609
You should also be able to run the tests locally using pytest
Hmm. Could you please give some direction on how to set up the dev environment so that I can run pytest locally? I have the dev container running, but where should I put the qolsysgw repo so that the tests will run? config/custom_components? Sorry for the newbie questions... The errors I get when running pytest now are: =================================== ERRORS ==================================== _____________ ERROR collecting tests/end-to-end/test_qolsysgw.py ______________ ImportError while importing test module 'c:\Users\j\source\repos\qolsysgw\tests\end-to-end\test_qolsysgw.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: ..\..\..\AppData\Local\Programs\Python\Python36-32\lib\importlib\__init__.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) tests\end-to-end\test_qolsysgw.py:2: in import copier E ModuleNotFoundError: No module named 'copier' ____ ERROR collecting tests/integration/test_alarm_control_panel_config.py ____ tests\integration\test_alarm_control_panel_config.py:4: in from testbase import TestQolsysGatewayBase tests\integration\testbase.py:12: in class TestQolsysGatewayBase(unittest.IsolatedAsyncioTestCase): E AttributeError: module 'unittest' has no attribute 'IsolatedAsyncioTestCase' _____________ ERROR collecting tests/integration/test_gateway.py ______________ tests\integration\test_gateway.py:4: in from testbase import TestQolsysGatewayBase tests\integration\testbase.py:12: in class TestQolsysGatewayBase(unittest.IsolatedAsyncioTestCase): E AttributeError: module 'unittest' has no attribute 'IsolatedAsyncioTestCase' _________ ERROR collecting tests/integration/test_gateway_control.py __________ tests\integration\test_gateway_control.py:4: in from testbase import TestQolsysGatewayBase tests\integration\testbase.py:12: in class TestQolsysGatewayBase(unittest.IsolatedAsyncioTestCase): E AttributeError: module 'unittest' has no attribute 'IsolatedAsyncioTestCase' __________ ERROR collecting tests/integration/test_qolsys_events.py ___________ tests\integration\test_qolsys_events.py:7: in from testbase import TestQolsysGatewayBase tests\integration\testbase.py:12: in class TestQolsysGatewayBase(unittest.IsolatedAsyncioTestCase): E AttributeError: module 'unittest' has no attribute 'IsolatedAsyncioTestCase' _________ ERROR collecting tests/unit/qolsysgw/mqtt/test_listener.py __________ tests\unit\qolsysgw\mqtt\test_listener.py:12: in class TestUnitMqttQolsysEventListener(unittest.IsolatedAsyncioTestCase): E AttributeError: module 'unittest' has no attribute 'IsolatedAsyncioTestCase' _________ ERROR collecting tests/unit/qolsysgw/qolsys/test_control.py _________ tests\unit\qolsysgw\qolsys\test_control.py:16: in class TestUnitQolsysControlDisarm(unittest.IsolatedAsyncioTestCase): E AttributeError: module 'unittest' has no attribute 'IsolatedAsyncioTestCase' =========================== short test summary info =========================== ERROR tests/end-to-end/test_qolsysgw.py ERROR tests/integration/test_alarm_control_panel_config.py - AttributeError: ... ERROR tests/integration/test_gateway.py - AttributeError: module 'unittest' h... ERROR tests/integration/test_gateway_control.py - AttributeError: module 'uni... ERROR tests/integration/test_qolsys_events.py - AttributeError: module 'unitt... ERROR tests/unit/qolsysgw/mqtt/test_listener.py - AttributeError: module 'uni... ERROR tests/unit/qolsysgw/qolsys/test_control.py - AttributeError: module 'un... !!!!!!!!!!!!!!!!!!! Interrupted: 7 errors during collection !!!!!!!!!!!!!!!!!!! ==================== 20 tests collected, 7 errors in 0.33s ==================== |
You seem to be lacking some requirements! From https://github.com/XaF/qolsysgw/blob/main/.github/workflows/build.yaml#L223-L225 :
That being said, the error left seems to simply be related to
|
… into temperature_support
Co-authored-by: Raphaël Beamonte <[email protected]>
42ca6e0
to
e5f7abb
Compare
Temperature
sensor
You should be able to rely on the tests here for the end-to-end now. Right now there is a lint issue! |
Sorry for the messy commits but "it" didn't want to add my new line in sensors.py. Now it should pass that linting, at least. |
Finally got the time to get to this, will merge now! |
Thank you for an awesome integration!
This PR adds support for Visonic TMD-560 PG2 Temperature sensor. It's a low/high temp sensor, so I'm not sure if 'heat' is the right sensor type. I have not been able to test but added the baseline code for the new sensor subclass.