Add button actions and presence reset blueprints
- Add inovelli_button_actions blueprint for multi-tap controls - Double-tap up: brightness boost (+50%) - Double-tap down: return to adaptive lighting - Triple-tap up: max brightness (100%, 4000K) - Triple-tap down: night light (5%, warm red) - Configurable auto-reset timeout - Add presence_mode_reset blueprint for occupancy integration - Auto-reset manual control when room empty - Optional mode reset to default - Configurable empty delay - Multiple occupancy sensor support - Fix entity name in living room template (light.living_room_lights)
This commit is contained in:
163
blueprints/automation/inovelli_button_actions.yaml
Normal file
163
blueprints/automation/inovelli_button_actions.yaml
Normal file
@@ -0,0 +1,163 @@
|
||||
---
|
||||
# blueprints/automation/inovelli_button_actions.yaml
|
||||
#
|
||||
# Inovelli Button Actions for Adaptive Lighting
|
||||
#
|
||||
# Implements multi-tap actions:
|
||||
# - Double tap up: Brightness boost (+50% from current AL setting)
|
||||
# - Double tap down: Return to Adaptive Lighting control
|
||||
# - Triple tap up: Maximum brightness (100%, neutral white)
|
||||
# - Triple tap down: Night light mode (5%, warm red)
|
||||
#
|
||||
# Features:
|
||||
# - Auto-reset after configurable timeout
|
||||
# - Reads current AL settings for relative boost
|
||||
# - Works with any Inovelli Blue Dimmer via Zigbee2MQTT
|
||||
#
|
||||
# Requirements:
|
||||
# - Inovelli Blue Dimmer (VZM31-SN) with buttonDelay >= 500ms
|
||||
# - Adaptive Lighting switch for the room
|
||||
# - Light entities to control
|
||||
#
|
||||
# Reference: ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md lines 308-421
|
||||
|
||||
blueprint:
|
||||
name: Inovelli Button Actions for Adaptive Lighting
|
||||
description: Multi-tap brightness controls with adaptive lighting integration
|
||||
domain: automation
|
||||
input:
|
||||
switch_action_event:
|
||||
name: Switch Action Event
|
||||
description: Event entity that reports button presses (event.xxx_action)
|
||||
selector:
|
||||
entity:
|
||||
domain: event
|
||||
|
||||
adaptive_lighting_switch:
|
||||
name: Adaptive Lighting Switch
|
||||
description: The AL switch entity for this room
|
||||
selector:
|
||||
entity:
|
||||
domain: switch
|
||||
integration: adaptive_lighting
|
||||
|
||||
target_lights:
|
||||
name: Target Lights
|
||||
description: Light entities to control
|
||||
selector:
|
||||
target:
|
||||
entity:
|
||||
domain: light
|
||||
|
||||
auto_reset_minutes:
|
||||
name: Auto-Reset Timeout (minutes)
|
||||
description: Minutes before returning to AL after manual boost
|
||||
default: 10
|
||||
selector:
|
||||
number:
|
||||
min: 0
|
||||
max: 120
|
||||
step: 5
|
||||
unit_of_measurement: minutes
|
||||
|
||||
mode: restart
|
||||
max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: !input switch_action_event
|
||||
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{{
|
||||
state_attr(trigger.entity_id, 'event_type') in
|
||||
['up_double', 'down_double', 'up_triple', 'down_triple']
|
||||
}}
|
||||
|
||||
action:
|
||||
- variables:
|
||||
action: "{{ state_attr(trigger.entity_id, 'event_type') }}"
|
||||
al_switch: !input adaptive_lighting_switch
|
||||
lights: !input target_lights
|
||||
reset_minutes: !input auto_reset_minutes
|
||||
|
||||
- choose:
|
||||
# ========================================================================
|
||||
# DOUBLE TAP UP - Brightness Boost
|
||||
# ========================================================================
|
||||
- conditions: "{{ action == 'up_double' }}"
|
||||
sequence:
|
||||
- variables:
|
||||
current_brightness: >-
|
||||
{{ state_attr(al_switch, 'brightness_pct') | float(50) }}
|
||||
boosted_brightness: "{{ [current_brightness + 50, 100] | min }}"
|
||||
current_color_temp: >-
|
||||
{{ state_attr(al_switch, 'color_temp_kelvin') | int(4000) }}
|
||||
boosted_color_temp: >-
|
||||
{{ [current_color_temp + 1000, 5500] | min }}
|
||||
|
||||
- service: light.turn_on
|
||||
target: "{{ lights }}"
|
||||
data:
|
||||
brightness_pct: "{{ boosted_brightness }}"
|
||||
color_temp_kelvin: "{{ boosted_color_temp }}"
|
||||
transition: 1
|
||||
|
||||
# Auto-reset after timeout
|
||||
- delay:
|
||||
minutes: "{{ reset_minutes }}"
|
||||
- service: adaptive_lighting.set_manual_control
|
||||
data:
|
||||
entity_id: "{{ al_switch }}"
|
||||
manual_control: false
|
||||
|
||||
# ========================================================================
|
||||
# DOUBLE TAP DOWN - Return to AL
|
||||
# ========================================================================
|
||||
- conditions: "{{ action == 'down_double' }}"
|
||||
sequence:
|
||||
- service: adaptive_lighting.set_manual_control
|
||||
data:
|
||||
entity_id: "{{ al_switch }}"
|
||||
manual_control: false
|
||||
|
||||
# ========================================================================
|
||||
# TRIPLE TAP UP - Max Brightness (Neutral White)
|
||||
# ========================================================================
|
||||
- conditions: "{{ action == 'up_triple' }}"
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
target: "{{ lights }}"
|
||||
data:
|
||||
brightness_pct: 100
|
||||
color_temp_kelvin: 4000
|
||||
transition: 0.5
|
||||
|
||||
# Auto-reset after timeout
|
||||
- delay:
|
||||
minutes: "{{ reset_minutes }}"
|
||||
- service: adaptive_lighting.set_manual_control
|
||||
data:
|
||||
entity_id: "{{ al_switch }}"
|
||||
manual_control: false
|
||||
|
||||
# ========================================================================
|
||||
# TRIPLE TAP DOWN - Night Light
|
||||
# ========================================================================
|
||||
- conditions: "{{ action == 'down_triple' }}"
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
target: "{{ lights }}"
|
||||
data:
|
||||
brightness_pct: 5
|
||||
rgb_color: [255, 50, 0]
|
||||
transition: 1
|
||||
|
||||
# Auto-reset after timeout
|
||||
- delay:
|
||||
minutes: "{{ reset_minutes }}"
|
||||
- service: adaptive_lighting.set_manual_control
|
||||
data:
|
||||
entity_id: "{{ al_switch }}"
|
||||
manual_control: false
|
||||
Reference in New Issue
Block a user