Skip to content

Conversation

@raman325
Copy link
Owner

@raman325 raman325 commented Jan 16, 2026

Summary

  • Add websocket command lock_code_manager/update_slot_condition to update slot conditions (entity_id, number_of_uses)
  • Fix config entry update to use options= instead of data= to properly trigger entity creation
  • Add edit/delete buttons for conditions with confirmation dialogs
  • Add "Manage Conditions" section when no conditions exist
  • Unified styling for number_of_uses and condition entity displays
  • Domain-specific status text (calendar: "Event active", schedule: "In schedule", etc.)
  • Add test for number entity creation on condition add

Test plan

  • Add condition entity to slot without one
  • Edit existing condition entity
  • Clear condition entity (delete)
  • Add number_of_uses tracking to slot without it
  • Edit number_of_uses value via inline edit
  • Remove number_of_uses tracking entirely (delete)
  • Verify entities are created/removed appropriately
  • Changes persist after page refresh
  • Subscription updates UI immediately

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings January 16, 2026 01:08
@github-actions github-actions bot added python Pull requests that update Python code javascript Pull requests that update javascript code enhancement New feature or request labels Jan 16, 2026
@codecov
Copy link

codecov bot commented Jan 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.99%. Comparing base (d727acd) to head (107a19f).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #810      +/-   ##
==========================================
- Coverage   96.02%   95.99%   -0.03%     
==========================================
  Files          29       29              
  Lines        2516     2549      +33     
  Branches       83       83              
==========================================
+ Hits         2416     2447      +31     
- Misses        100      102       +2     
Flag Coverage Δ
python 95.95% <100.00%> (-0.03%) ⬇️
typescript 96.47% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
custom_components/lock_code_manager/websocket.py 95.87% <100.00%> (+0.30%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@raman325 raman325 force-pushed the feat/slot-condition-editing branch 2 times, most recently from e19a446 to a474608 Compare January 16, 2026 01:16
@raman325 raman325 changed the title Add slot condition editing from card UI Add slot condition editing UI with consistent styling Jan 16, 2026
@github-actions github-actions bot removed the enhancement New feature or request label Jan 16, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

raman325 and others added 12 commits January 16, 2026 12:28
Add ability to add, edit, or remove condition entity and number_of_uses
directly from the slot card:

- New websocket command `update_slot_condition` to update slot config
- Edit icons on condition rows to modify existing conditions
- "Manage Conditions" row when no conditions exist
- Dialog for entity picker and number_of_uses configuration
- Support for clearing/removing conditions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add label attribute to ha-entity-picker
- Add display block style for entity picker
- Remove invalid allow-custom-entity attribute

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
ha-selector is more commonly used in HA dialogs and should render properly

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Work around dialog rendering issue where property bindings don't apply

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
ha-entity-picker requires explicit import which isn't available to custom cards.
Native select provides the same functionality.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Provides native browser autocomplete/filtering for long entity lists

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Show clear button when entity is selected (not just when saved)
- Also clear input element directly when clearing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add websocket command to update slot conditions (entity_id, number_of_uses)
- Fix config entry update to use options= to trigger entity creation
- Add edit/delete buttons for conditions with confirmation dialogs
- Add "Manage Conditions" section when no conditions exist
- Unified styling for number_of_uses and condition entity displays
- Domain-specific status text (calendar: Event active, schedule: In schedule)
- Add test for number entity creation on condition add

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@raman325 raman325 force-pushed the feat/slot-condition-editing branch from 5ea4c47 to 107a19f Compare January 16, 2026 17:29
@raman325 raman325 merged commit 9e08552 into main Jan 16, 2026
19 checks passed
@raman325 raman325 deleted the feat/slot-condition-editing branch January 16, 2026 17:50
@raman325 raman325 added enhancement New feature or request lcm-minor Minor version bump labels Jan 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request javascript Pull requests that update javascript code lcm-minor Minor version bump python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants