-
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 Shock
sensor
#143
Conversation
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.
Hello!
Thank you for contributing!
Could you please add the relevant test and fixtures too?
You should have the following files modified by this PR to ensure we're testing the right stuff:
- apps/qolsysgw/mqtt/updater.py
- apps/qolsysgw/qolsys/sensors.py
- tests/end-to-end/test_qolsysgw.py
- tests/integration/test_qolsys_events.py
- tests/mock_modules/testutils/fixtures_data.py
I'll take care of these on Monday! Thanks for the feedback! |
All files updated.
Note: I found a missing dependency in requirements-tools.txt. Took the chance to add it. |
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.
Another few comments, and there's two tests failing.
One of them related to the expected number of sensors in the tests, since this adds one :)
Co-authored-by: Raphaël Beamonte <[email protected]>
Co-authored-by: Raphaël Beamonte <[email protected]>
Made the required changes, thanks for the feedback |
Still some failing tests, are you able to fix that? :) |
Done, that failing test should work now. |
It seems to be failing at the e2e tests now :( It is because the group here is written with a capital According to your message in the PR description, I believe it's supposed to be a lowercase I'll try to apply the changes from GitHub directly and re-run the tests! |
Ok, we're good! 🎉 |
Shock
sensor
Hi,
First off, thanks for writing this App. It saved my IQPanel 2 from the scrap heap!
I noticed my setup uses "shock" sensors which werent supported by the App.
Error Seen:
2024-01-05 14:15:43.717826 WARNING qolsys_panel: sensor of unknown type: {'id': '170-7272', 'type': 'Shock', 'name': 'Upstairs Shock Detector', 'group': 'shock', 'status': 'Closed', 'state': '0', 'zone_id': 14, 'zone_physical_type': 12, 'zone_alarm_type': 0, 'zone_type': 107, 'partition_id': 0}
I've added the code needed locally and tested it against my setup. It functions as expected.
More than open to feedback!