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.
93 lines
2.8 KiB
YAML
93 lines
2.8 KiB
YAML
# blueprints/automation/inovelli_mode_cycling.yaml
|
|
#
|
|
# Inovelli Config Button Mode Cycling
|
|
#
|
|
# Cycles through lighting modes when the config button is pressed on an
|
|
# Inovelli Blue Dimmer Switch (VZM31-SN) via Zigbee2MQTT.
|
|
#
|
|
# Features:
|
|
# - Cycles through available modes in input_select
|
|
# - Updates LED color to match new mode (ROYGBIV scheme)
|
|
# - Flashes LED to confirm mode change (3-second pulse)
|
|
#
|
|
# Requirements:
|
|
# - Inovelli Blue Dimmer (VZM31-SN) paired with Zigbee2MQTT
|
|
# - input_select helper with available modes
|
|
# - packages/adaptive_lighting_global.yaml for mode colors
|
|
#
|
|
# Reference: ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md lines 144-182
|
|
|
|
blueprint:
|
|
name: Inovelli Config Button Mode Cycling
|
|
description: Press config button to cycle through lighting modes with LED feedback
|
|
domain: automation
|
|
input:
|
|
switch_action_sensor:
|
|
name: Switch Action Sensor
|
|
description: The sensor entity that reports button presses (sensor.xxx_action)
|
|
selector:
|
|
entity:
|
|
domain: sensor
|
|
integration: mqtt
|
|
|
|
mode_input_select:
|
|
name: Mode Input Select
|
|
description: The input_select helper that tracks current lighting mode
|
|
selector:
|
|
entity:
|
|
domain: input_select
|
|
|
|
led_color_entity:
|
|
name: LED Color Entity
|
|
description: The number entity for LED color when on (number.xxx_led_color_when_on)
|
|
selector:
|
|
entity:
|
|
domain: number
|
|
|
|
zigbee2mqtt_device_name:
|
|
name: Zigbee2MQTT Device Name
|
|
description: The device name in Zigbee2MQTT (for LED flash effect via MQTT)
|
|
example: "bedroom_switch"
|
|
selector:
|
|
text:
|
|
|
|
mode: single
|
|
max_exceeded: silent
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id: !input switch_action_sensor
|
|
to: "config_single"
|
|
|
|
action:
|
|
- variables:
|
|
mode_select: !input mode_input_select
|
|
current_mode: "{{ states(mode_select) }}"
|
|
available_modes: "{{ state_attr(mode_select, 'options') }}"
|
|
current_index: "{{ available_modes.index(current_mode) }}"
|
|
next_index: "{{ (current_index + 1) % (available_modes | length) }}"
|
|
next_mode: "{{ available_modes[next_index] }}"
|
|
mode_colors: "{{ state_attr('input_text.adaptive_lighting_mode_colors', 'state') | from_json }}"
|
|
next_color: "{{ mode_colors.get(next_mode, 170) }}"
|
|
|
|
# Change to next mode
|
|
- service: input_select.select_option
|
|
target:
|
|
entity_id: !input mode_input_select
|
|
data:
|
|
option: "{{ next_mode }}"
|
|
|
|
# Update LED color
|
|
- service: number.set_value
|
|
target:
|
|
entity_id: !input led_color_entity
|
|
data:
|
|
value: "{{ next_color }}"
|
|
|
|
# Flash LED to confirm mode change (3-second pulse)
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "zigbee2mqtt/{{ zigbee2mqtt_device_name }}/set"
|
|
payload: >-
|
|
{"led_effect": {"effect": "pulse", "color": {{ next_color }}, "level": 100, "duration": 3}}
|