9 Commits

Author SHA1 Message Date
aeb9d99930 Fix YAML block scalar causing template line-wrapping in blueprints
Replace block scalar (>-) with regular quoted strings for settings_entity
templates. The block scalar was causing Home Assistant to wrap lines in
the middle of the replace() function call, breaking the template parsing.

This fixes:
- LED color not updating in mode cycling automation
- Mode settings not being applied in apply mode automation

The templates now stay on a single line and parse correctly.
2025-12-21 18:10:46 -08:00
6f612787a1 Update Inovelli mode cycling blueprint to use nested schema
Replace reference to deleted adaptive_lighting_mode_colors entity with
convention-based mode settings lookup. The blueprint now extracts led_color
from each mode's nested JSON schema (input_text.adaptive_lighting_settings_{{mode}})
instead of using a separate color mapping entity.

This fixes the error:
"ValueError: Template error: from_json got invalid input 'unknown' when
rendering template '{{ states('input_text.adaptive_lighting_mode_colors') | from_json }}'"
2025-12-21 18:03:52 -08:00
27d322f09f Update feedback flash to 0.5 seconds 2025-12-20 15:33:41 -08:00
4f344e7b16 Fix inovelli_mode_cycling blueprint trigger for event entities
Correct the trigger mechanism to match how Home Assistant event entities
actually work. Event entities trigger on state changes and expose the
actual event type as an attribute, not as event_data.

Changes:
- Replace platform:event trigger with platform:state
- Add condition to check event_type attribute for 'config_single'
- Remove incorrect event_data and state_changed event_type usage

This matches the working pattern used in production automations and
ensures the blueprint triggers correctly when the config button is
pressed on Inovelli switches.
2025-12-20 15:24:24 -08:00
44c7771f09 Update inovelli_mode_cycling blueprint to use event entity
Change from sensor-based to event-based trigger for Inovelli button
presses. This aligns with Zigbee2MQTT's modern event entity approach
and matches the Phase 1 plan specification.

Changes:
- Replace switch_action_sensor (sensor domain) with switch_action_event (event domain)
- Update trigger from platform:state to platform:event with event_data
- Use state_changed event type for proper event handling

This provides more reliable button press detection and cleaner event
handling compared to the older sensor state monitoring approach.
2025-12-20 15:15:03 -08:00
988a7e0933 Fix inovelli_mode_cycling blueprint: remove invalid 'example' key
The 'example' key is not a valid blueprint input parameter in Home Assistant.
Moved the example value into the description field instead.
2025-12-20 15:02:37 -08:00
258c4172e9 Implement Adaptive Lighting Mode System Phase 1 foundation
Add global mode definitions and config button mode cycling blueprint to
establish the foundation for the adaptive lighting mode system.

Changes:
- Add input_text helpers for all 11 mode settings (Adaptive, Reading,
  Relaxing, Sleep, Theater, Party, Homework, Play, Cooking, Dining,
  Cleanup) with JSON configuration for brightness, color temp, and
  transition parameters
- Store mode settings as individual input_text entities to work within
  Home Assistant's 255 character limit
- Add usage notes for accessing mode settings in templates
- Fix variable definition bug in inovelli_mode_cycling blueprint by
  adding zigbee2mqtt_device_name to variables section
- Update README to reflect that PACKAGE_SETUP_GUIDE.md exists

All YAML files validated with yamllint. JSON configuration validated
with jq.

Part of Phase 1 implementation from adaptive lighting mode system plan.
Automated verification complete, ready for manual testing.
2025-12-20 15:00:02 -08:00
ea426e56ef Fix input_text max length constraint for mode colors
- Add max: 255 parameter to adaptive_lighting_mode_colors input_text
- Minify JSON to fit within Home Assistant's 100 character default limit
- Remove adaptive_lighting_mode_settings input_text (too long, convert to comments)
- Remove get_mode_settings script (no longer needed)
- Fix template syntax: use states() instead of state_attr() for input_text values
- Convert mode settings to reference documentation comments

This fixes the 'Initial value length not in range 0-100' error from Home Assistant.
2025-12-20 14:38:21 -08:00
2cb34c7c9f Add Adaptive Lighting Mode System foundation (Phase 1)
Implement the foundation for a comprehensive mode-based lighting control
system for Inovelli Blue Dimmer Switches with Adaptive Lighting integration.

This Phase 1 implementation includes:

- Global mode definitions package (packages/adaptive_lighting_global.yaml)
  containing ROYGBIV color scheme mappings and mode settings for all
  standard modes (Adaptive, Reading, Theater, Sleep, etc.)

- Inovelli mode cycling blueprint (blueprints/automation/inovelli_mode_cycling.yaml)
  enabling config button to cycle through lighting modes with LED feedback

- Updated README with system overview, features, and quick start guide

The system provides room-specific lighting modes with visual LED feedback,
config button control, and git-trackable configuration via Home Assistant
packages.

Next phases will add mode application automations, button action blueprints,
presence integration, and comprehensive documentation.
2025-12-20 14:22:24 -08:00