Skip to content

Respect Bluetooth interface validation errors - #1592

Open
IoannisArmamentos wants to merge 1 commit into
custom-components:masterfrom
IoannisArmamentos:fix/bt-interface-validation
Open

Respect Bluetooth interface validation errors#1592
IoannisArmamentos wants to merge 1 commit into
custom-components:masterfrom
IoannisArmamentos:fix/bt-interface-validation

Conversation

@IoannisArmamentos

Copy link
Copy Markdown
Contributor

Summary

Ensure invalid Bluetooth interface selections are rejected by the config and options flows.

Problem

Both the initial configuration flow and the options flow could set the
cannot_disable_bt_interface validation error when disable was selected together
with another Bluetooth adapter.

However, both flows continued to create or save the entry instead of redisplaying the
form with the validation error.

Fix

Return the main form whenever validation errors are present before creating or saving
the entry.

Valid Bluetooth interface selections continue to follow the existing behavior unchanged.

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