my-cards v2.2.0-beta.2
Beta release — all changes below are opt-in or behavior-preserving. Existing configs work unchanged.
New features
Show value while dragging (#23) new showValue: true option for my-slider-v2.
A floating bubble appears above the thumb and follows it while you drag, showing the value. Hidden when not interacting. Fully
styleable via styles: value:. Note: don't put overflow: hidden on styles: card: or the bubble gets clipped, the container is the right place for it. See the docs for examples.
type: custom:my-slider-v2
entity: light.livingroom
showValue: trueAttribute sliders (#48) new attribute: option to read/write an entity attribute instead of its state. The classic use case: humidifier target humidity. The range defaults from the entity's own min_<attribute>/max_<attribute> attributes when present (override with min:/max:), and writes go through the domain's set_<attribute> service. Entities outside the normally supported domains are allowed
when attribute: is set.
type: custom:my-slider-v2
entity: humidifier.laundry_room
attribute: humidityFixes
styles: thumb: right:was silently ignored on vertical sliders.- Dragging a slider in the instant before its first render threw an uncaught
TypeErrorand could leave the slider unresponsive. - Performance/memory: every entity state change permanently added document-level event listeners that all ran on every mouse move and kept removed cards alive. Listeners are now registered once per card and cleaned up on removal.
Documentation
- New "Attribute sliders" section with examples.
- Previously undocumented options documented:
sliderId(including the default id format and thedata-value/data-progress-percentattributes),showValue. - Corrected supported-domains list (
number,input_booleanwere missing) and thedisableScrolldefault description; thestyles:components are now listed.
Internal (no user-facing changes intended)
- Build toolchain modernized: rollup 1 → 4, TypeScript 3.9 → 6, official @rollup plugins, babel removed. Dependencies pruned and updated.
- Slider internals cleaned up: duplicated per-entity math extracted into tested pure functions, single
deflateimplementation, fewer redundant computations per render. - Test suite grown to 155 tests, including a smoke test of the actual built bundle.
For beta testers
Everything above is covered by automated tests, but real-dashboard feedback is welcome. Let me know if anything changes regarding drag/tap feel on every slider type you use (the input path was reworked), the showValue bubble in tight layouts (stacks, grids, card_mod), and attribute: with a humidifier or similar devices. Please report anything odd in the relevant issues or feel free to create new ones.
Full Changelog: v2.1.0-beta.1...v2.2.0-beta.2