Files
ledgrab/TODO.md
T
alexei.dolgolyov 8a17bb5caa
Lint & Test / test (push) Successful in 1m20s
feat: BindableFloat — universal value source binding for all scalar properties
Introduce BindableFloat abstraction that allows any numeric property to be
either a static value or dynamically driven by a ValueSource. Backward-compatible
serialization: plain float when unbound, {value, source_id} dict when bound.

Backend:
- storage/bindable.py — BindableFloat dataclass + bfloat() helper
- 25+ scalar properties converted across all entity types
- Runtime VS acquisition in ColorStripStreamManager for CSS bindings
- All stream hot loops use self.resolve() for live values
- KeyColorsColorStripStream now inherits ColorStripStream

Frontend:
- BindableScalarWidget (slider + VS picker toggle) for all editors
- TypeScript BindableFloat type + helpers
- Graph editor edges for all bindable properties
- Audio source channel IconSelect grid

Fixes: daylight longitude, candlelight wind_strength/candle_type from_dict
2026-03-29 00:33:24 +03:00

1.9 KiB

BindableFloat — Universal Value Source Binding

ALL PHASES COMPLETE

Phase 1: Core Infrastructure

  • storage/bindable.py — BindableFloat dataclass + bfloat() extraction helper
  • WledOutputTarget, HALightOutputTarget, HALightMapping — brightness/transition
  • All 15 CSS source types — smoothing, sensitivity, intensity, scale, speed, etc.
  • API schemas + routes updated
  • output_target_store create/update
  • processor_manager add_target / add_ha_light_target

Phase 2: Runtime Resolution

  • WledTargetProcessor — BindableFloat brightness, acquire/release value streams
  • HALightTargetProcessor — BindableFloat brightness + transition
  • All CSS streams use bfloat() to extract static values from BindableFloat properties
  • scene_activator — brightness_changed flag
  • ColorStripStream base class — resolve(), set_value_stream(), remove_value_stream()
  • ColorStripStreamManager — _bind_value_streams() / _release_value_streams() on acquire/release
  • All stream hot loops call self.resolve(prop, static) for dynamic runtime binding
  • KeyColorsColorStripStream — fixed to inherit from ColorStripStream

Phase 3: Frontend

  • TypeScript BindableFloat type + bindableValue() / bindableSourceId() helpers
  • targets.ts, ha-light-targets.ts, color-strips.ts — save/load/display
  • Graph connections — value source edges for ALL bindable CSS properties
  • Graph layout — edge creation for CSS + target bindable properties
  • custom_components/select.py — HA integration backward compat

Phase 4: BindableScalarWidget

  • core/bindable-scalar.ts — reusable widget (slider + VS picker toggle)
  • CSS styles (.bindable-toggle, .bindable-slider-row, .bindable-vs-row)
  • All 11 CSS editor sliders converted (smoothing, sensitivity, intensity, scale, speed, wind, temp_influence, timeout)
  • HTML templates updated with container divs