Start locked by default and remember the lock toggle - #22
Open
bharvey88 wants to merge 1 commit into
Open
Conversation
The card picker stub set start_locked: false, which switched off the auto-lock for every card added through the UI. Drop it from the stub, remember the Lock toggle per location in localStorage, and document when to set start_locked explicitly. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
A user reported that scrolling past the card on a phone dashboard kept editing their zones. The card already locks itself on load when zones exist (#19), but
getStubConfig()writesstart_locked: falseinto every card added through the card picker, and an explicit key disables that auto-lock. So UI-added cards start unlocked on every page load, and tapping Lock only lasts until the next reload.start_lockedfrom the stub config so picker-added cards get the auto-lock.locationinlocalStorage(same pattern as the device selection from Remember the selected device and target entities across reloads #21). An explicitstart_lockedin YAML still wins over both the remembered toggle and the zones check.start_lockedas an optional override.Workaround for anyone on the current release: delete the
start_locked: falseline from the card YAML, or set it totrue.Related Issue
None filed. Reported in the community.
Type of Change
Checklist
Testing
node --checkon the bundle, and the two storage helpers exercised against a fakelocalStorage(null before any toggle,true/falseround trip). Not yet loaded into a live HA.Screenshots (if applicable)
n/a
🤖 Generated with Claude Code