Skip to content
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

Added RSSI sensor #26

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Added RSSI sensor #26

wants to merge 6 commits into from

Conversation

muxa
Copy link

@muxa muxa commented Feb 25, 2023

This adds ability to add a signal strength sensor for the BLE connection (for feature request #25). The sensor is not exposed by default and can be added via rssi: configuration, e.g:

ble_keyboard:
  ...
  rssi:
    name: "RSSI"

@sourcery-ai
Copy link

sourcery-ai bot commented Feb 25, 2023

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.40%.

Quality metrics Before After Change
Complexity 1.38 ⭐ 1.35 ⭐ -0.03 👍
Method Length 177.62 😞 172.29 😞 -5.33 👍
Working memory 12.84 😞 14.72 😞 1.88 👎
Quality 63.71% 🙂 63.31% 🙂 -0.40% 👎
Other metrics Before After Change
Lines 1044 1078 34
Changed files Quality Before Quality After Quality Change
components/ble_keyboard/__init__.py 74.47% 🙂 74.93% 🙂 0.46% 👍
components/ble_keyboard/const.py 35.25% 😞 34.08% 😞 -1.17% 👎

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
components/ble_keyboard/__init__.py ble_keyboard_press_to_code 2 ⭐ 125 😞 8 🙂 68.04% 🙂 Try splitting into smaller methods
components/ble_keyboard/__init__.py ble_keyboard_combination_to_code 0 ⭐ 132 😞 8 🙂 69.20% 🙂 Try splitting into smaller methods

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant