-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Tell mobile app to scan for Improv devices when 'Add Integration' tap #21420
Tell mobile app to scan for Improv devices when 'Add Integration' tap #21420
Conversation
WalkthroughWalkthroughThe changes introduce a new interface Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant HaConfigIntegrationsDashboard
participant ExternalApp
User->>HaConfigIntegrationsDashboard: Access Integration Dashboard
HaConfigIntegrationsDashboard->>ExternalApp: Check canSetupImprov
alt canSetupImprov is true
HaConfigIntegrationsDashboard->>ExternalApp: fireMessage(type: "improv/scan")
end
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Should we do this when you click add integration, or when the integration page is loaded? We scan for USB devices for example when the page is opened. |
My idea was to trigger it as soon as the user taps "add integration" so it knows it is in a "Add device context" and then the mobile app can ask for Bluetooth usage permission etc. |
Since it is discovered I would expect as a user not to have to press on the add device button for it to show up. The permission is just a one time thing right? |
Indeed but on top of that I wanted to avoid unecessary usage of Bluetooth, devices & integrations is a page where (at least myself) go through it many times. But we can experiment having it on page load too. |
I can't judge how expensive the scanning is, so I leave that judgement to you, could be a good reason not to do it on page load indeed. |
Sounds good, I'll merge it like this for now until I evaluate the impact and then update it if makes sense |
Breaking change
Proposed change
Add event to call the mobile app and ask to start scanning for Improv BLE devices.
ref: home-assistant/iOS#2855
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed:
Summary by CodeRabbit
canSetupImprov
indicator.