Fixes alarm dialog inputmode for code input #18263
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed change
This change ensures that the
inputmode
is set on the input field for the code entry dialog (for example to arm/disarm an alarm). Currently this is not set because of a hyphen in the attribute.The
inputmode
is helpful particularly on mobile keyboards that change how they are displayed. For an alarm code that is all numbers, this PR will ensure that on supported devices a numeric keyboard (only digits) is shown instead of the full QWERTY keyboard.Type of change
Example configuration
Add an alarm entity with a number code to arm/disarm. Open the alarm dialog on a mobile device, then change the alarm arming status. This will display the code entry dialog. Click/tap on the input field and you should now see a numeric keyboard instead of the full qwerty keyboard on the mobile device.
Additional information
Checklist