Skip to content

feat: add QR scanner view and improve registration logic for QR callback#7

Merged
Kannix2005 merged 3 commits into
mainfrom
qr_scanner_to_local_view
Feb 26, 2026
Merged

feat: add QR scanner view and improve registration logic for QR callback#7
Kannix2005 merged 3 commits into
mainfrom
qr_scanner_to_local_view

Conversation

@Kannix2005
Copy link
Copy Markdown
Owner

Added the qr_scanner view to the local instance. This only works if a https connection is available.

Copilot AI review requested due to automatic review settings February 26, 2026 23:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds a local QR scanner view to enable QR code scanning directly within Home Assistant when HTTPS is available, falling back to an external scanner when only HTTP is available. This improves the user experience for Siedle device configuration by allowing camera-based QR scanning within the local instance.

Changes:

  • Added SiedleQRScannerView class to serve an HTML page with embedded QR scanner functionality
  • Updated view registration logic in both async_setup() and async_step_user() to register both callback and scanner views
  • Modified URL construction logic to detect HTTPS availability and choose between local scanner or external hosted scanner
  • Changed callback URL encoding from safe=':/' to safe=''

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 14 comments.

File Description
custom_components/siedle/init.py Added QR_SCANNER_HTML template (~300 lines) and SiedleQRScannerView class; updated async_setup() to register the new scanner view
custom_components/siedle/config_flow.py Modified async_step_user() to import and register scanner view, added HTTPS detection logic, changed callback_url encoding

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread custom_components/siedle/__init__.py
Comment thread custom_components/siedle/config_flow.py
Comment thread custom_components/siedle/config_flow.py
Comment thread custom_components/siedle/__init__.py
Comment thread custom_components/siedle/__init__.py
Comment thread custom_components/siedle/__init__.py
Comment thread custom_components/siedle/config_flow.py Outdated
Comment thread custom_components/siedle/__init__.py
Comment thread custom_components/siedle/__init__.py
Comment thread custom_components/siedle/config_flow.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Kannix2005 Kannix2005 merged commit 550a7d5 into main Feb 26, 2026
2 checks passed
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