Skip to content

refactor: Deprecate ATC (OpenEPaperLink) protocol and simplify entity structure#34

Open
stuart-c-ai wants to merge 3 commits into
OpenDisplay:mainfrom
stuart-c:deprecate-atc-support
Open

refactor: Deprecate ATC (OpenEPaperLink) protocol and simplify entity structure#34
stuart-c-ai wants to merge 3 commits into
OpenDisplay:mainfrom
stuart-c:deprecate-atc-support

Conversation

@stuart-c-ai
Copy link
Copy Markdown

Stacked PR Dependency

Important

This Pull Request represents Stage 1 of our sequential migration to the new py-opendisplay BLE library. It depends on and includes the changes from the initial integration PR.

Please ensure that PR #33: Integrate py-opendisplay BLE Library is merged before this PR is reviewed or merged.


Description & Goal

The goal of this stage is to completely deprecate support for the legacy ATC (OpenEPaperLink) protocol and streamline our entity layouts and handlers.

By removing ATC support early, we dramatically simplify the codebase and ensure that subsequent migration stages can focus exclusively on standard OpenDisplay devices without maintaining legacy protocol branches and complex metadata fallbacks.


What was Done & Why

1. Bluetooth Discovery Restriction

  • File: custom_components/opendisplay/manifest.json
  • What: Removed the Bluetooth manufacturer ID 4919 (ATC/OpenEPaperLink) from the integration manifest, retaining only 9286 (OpenDisplay).
  • Why: To prevent the integration from attempting to discover or claim ATC devices.

2. Config Flow Streamlining

  • File: custom_components/opendisplay/config_flow.py
  • What: Updated async_step_bluetooth to immediately abort with an unsupported_protocol error if manufacturer ID is 4919. Simplified the confirmation step by removing the atc case placeholders and flat metadata generation, ensuring that only standard OpenDisplay metadata is processed and persisted.
  • Why: Prevents ATC devices from proceeding through setup and eliminates duplicate config flows.

3. Setup Cleanup

  • File: custom_components/opendisplay/__init__.py
  • What: Removed the legacy async_remove_clock_mode_buttons() calls and older color_scheme migration pathways that were only needed for ATC compatibility. Simplified integration entry initialization to assume OpenDisplay protocol only.
  • Why: Strips out obsolete setup routines to keep the component initializers clean.

4. Logic & Entity Simplication

  • Files: sensor.py, update.py, upload.py, services.py
  • What: Stripped all checks, branches, and custom logic querying for protocol_type == "atc".
  • Why: Streamlines data processing, image rendering, and update checks by assuming a uniform protocol type (open_display) for all active BLE devices.

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.

2 participants