Skip to content

Start locked by default and remember the lock toggle - #22

Open
bharvey88 wants to merge 1 commit into
mainfrom
remember-lock-state
Open

Start locked by default and remember the lock toggle#22
bharvey88 wants to merge 1 commit into
mainfrom
remember-lock-state

Conversation

@bharvey88

Copy link
Copy Markdown
Collaborator

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() writes start_locked: false into 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.

  • Drop start_locked from the stub config so picker-added cards get the auto-lock.
  • Remember the Lock toggle per location in localStorage (same pattern as the device selection from Remember the selected device and target entities across reloads #21). An explicit start_locked in YAML still wins over both the remembered toggle and the zones check.
  • README: describe the auto-lock and mark start_locked as an optional override.

Workaround for anyone on the current release: delete the start_locked: false line from the card YAML, or set it to true.

Related Issue

None filed. Reported in the community.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

Checklist

  • I have read the CONTRIBUTING document
  • I have updated the documentation accordingly
  • I have updated the translations if needed

Testing

node --check on the bundle, and the two storage helpers exercised against a fake localStorage (null before any toggle, true/false round trip). Not yet loaded into a live HA.

Screenshots (if applicable)

n/a

🤖 Generated with Claude Code

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)
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: d8c82b0f-fc17-4a36-a790-43544b81438a


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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