Skip to content

Conversation

@foXaCe
Copy link

@foXaCe foXaCe commented Oct 19, 2025

Add missing French translations for configuration options, calibration steps, and error messages.

Add missing French translations for configuration options, calibration steps, and error messages.
Use localization system for status messages instead of hardcoded strings.
The previous approach using self.hass.localize() was causing errors.
These dynamic messages in description_placeholders cannot be easily
localized with the standard Home Assistant translation system.
- Add search/filter field to find devices by name, MAC address or manufacturer
- Group devices by type (iBeacon, standard BLE, random MAC) with separate selectors
- Implement pagination (50 devices per category) with automatic filtering bypass
- Display device counts and helpful search tips
- Add manufacturer and RSSI information to device labels for better identification
- Include full French and English translations

This makes device selection much easier when dealing with large numbers of
Bluetooth devices, especially useful for finding specific Tile trackers or
other devices by manufacturer name.
- Fix E501: Split long line in iBeacon label to stay within 120 char limit
- Fix N806: Change MAX_DEVICES_PER_CATEGORY to lowercase max_devices_per_category
foXaCe and others added 17 commits November 17, 2025 07:59
The search filter was not working because the form submission logic was
incorrectly detecting filter-only submissions as device selections.

Changes:
- Fixed condition to check for actual device selections (non-empty lists)
  instead of just checking if selector fields exist in user_input
- Added debug logging to track filter and selection behavior
- Updated UI text to clarify that users need to click Submit to apply filters
- Added visual feedback showing active filter text
- Updated both English and French translations

The search now works correctly:
1. User types search term and clicks Submit → form re-renders with filtered devices
2. User selects devices and clicks Submit → saves selection and exits

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add detailed logging to understand how service UUIDs are being processed
and why Tile devices (UUID 0xFEED) may not be recognized properly.

This will help diagnose:
- The exact format of UUIDs received from BLE advertisements
- Whether the UUID extraction logic (uuid[4:8]) is working correctly
- If the manufacturer lookup is finding Tile, Inc. in the database

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
CRITICAL fixes:
- util.py: rssi_to_metres() now returns None instead of False for missing params
- bermuda_device.py: fixed bitwise operations for MAC address type detection
  (0b00 AND always returns 0, changed to proper equality checks)

HIGH fixes:
- coordinator.py: fixed incorrect `val is any([...])` to `val in (...)`
- __init__.py: fixed _LOGGER.exception() usage (auto-captures exception)
- coordinator.py: simplified redundant `is ... or ==` to just `==`

MEDIUM fixes:
- const.py: added BDADDR_TYPE_RANDOM_RESERVED constant
- pyproject.toml: removed obsolete ANN101 rule
- const.py: removed invalid RUF028 suppression comments

Also fixed multiple spelling errors in comments
CRITICAL fixes:
- bermuda_device.py:445: floor_level self-assignment bug (was no-op)
  Changed `self.floor_level = self.floor_level` to `self.floor_level = self.floor.level`

MEDIUM fixes:
- coordinator.py:1035-1043: added early return after validation errors
  to prevent invalid devices from proceeding
- coordinator.py:883: fixed off-by-one pruning error using cutoff_index
  properly (was pruning one fewer device than needed)
- sensor.py:275: unguarded dict access now uses .get() with None check
- sensor.py:363-366: scanner device lookup now validates and raises KeyError
- bermuda_irk.py:141: added early return when cipher is None

LOW fixes:
- coordinator.py:1491: removed unused type annotation line
- coordinator.py:15/99: moved BaseHaScanner import to TYPE_CHECKING block
When a device is not detected (out of BLE range), area-related sensors
now return "not_home" instead of "unknown" for consistency with
device_tracker behavior.

This fixes two issues:
1. Blueprints no longer need to explicitly handle "unknown" as absent
2. HA restarts no longer trigger false arrivals (unknown -> area)

Affected sensors:
- sensor.*_area: returns "not_home" when area_name is None
- sensor.*_floor: returns "not_home" when floor_name is None
- sensor.*_scanner: returns "not_home" when no scanner detected
- Add Debouncer to coordinator for request refresh throttling
- Add py.typed marker for strict typing (PEP 561)
- Add loggers field to manifest.json (Bronze requirement)
- Add selectors to services.yaml fields for better UI
- Improve service description
Replace TODO/FIXME markers with descriptive comments:
- bermuda_irk.py: Document bleak version compatibility
- config_flow.py: Clarify HTML placeholder workaround
- coordinator.py: Document design decisions and known limitations
- sensor.py: Simplify icon property comment

No functional changes - documentation only.
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