Compare commits
4 Commits
14fadbe44e
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 96ab81f7ae | |||
| aeb9d99930 | |||
| 6f612787a1 | |||
| 16319e5bc4 |
@@ -2,30 +2,29 @@ blueprint:
|
|||||||
name: Apply Lighting Mode Settings
|
name: Apply Lighting Mode Settings
|
||||||
description: Data-driven mode application using convention-based entity lookup
|
description: Data-driven mode application using convention-based entity lookup
|
||||||
domain: automation
|
domain: automation
|
||||||
|
input:
|
||||||
|
mode_input_select:
|
||||||
|
name: Mode Input Select
|
||||||
|
description: Dropdown helper tracking current lighting mode
|
||||||
|
selector:
|
||||||
|
entity:
|
||||||
|
domain: input_select
|
||||||
|
|
||||||
input:
|
adaptive_lighting_switch:
|
||||||
mode_input_select:
|
name: Adaptive Lighting Switch
|
||||||
name: Mode Input Select
|
description: AL switch for this room
|
||||||
description: Dropdown helper tracking current lighting mode
|
selector:
|
||||||
selector:
|
entity:
|
||||||
entity:
|
domain: switch
|
||||||
domain: input_select
|
integration: adaptive_lighting
|
||||||
|
|
||||||
adaptive_lighting_switch:
|
led_color_entity:
|
||||||
name: Adaptive Lighting Switch
|
name: LED Color Entity (Optional)
|
||||||
description: AL switch for this room
|
description: Number entity for LED color (e.g., Inovelli switch)
|
||||||
selector:
|
default: {}
|
||||||
entity:
|
selector:
|
||||||
domain: switch
|
entity:
|
||||||
integration: adaptive_lighting
|
domain: number
|
||||||
|
|
||||||
led_color_entity:
|
|
||||||
name: LED Color Entity (Optional)
|
|
||||||
description: Number entity for LED color (e.g., Inovelli switch)
|
|
||||||
default: {}
|
|
||||||
selector:
|
|
||||||
entity:
|
|
||||||
domain: number
|
|
||||||
|
|
||||||
mode: restart
|
mode: restart
|
||||||
max_exceeded: silent
|
max_exceeded: silent
|
||||||
@@ -41,8 +40,7 @@ variables:
|
|||||||
al_switch: !input adaptive_lighting_switch
|
al_switch: !input adaptive_lighting_switch
|
||||||
led_entity: !input led_color_entity
|
led_entity: !input led_color_entity
|
||||||
mode: "{{ states(mode_select) }}"
|
mode: "{{ states(mode_select) }}"
|
||||||
settings_entity: >-
|
settings_entity: "input_text.adaptive_lighting_settings_{{ mode | lower | replace(' ', '_') }}"
|
||||||
input_text.adaptive_lighting_settings_{{ mode | lower | replace(' ', '_') }}
|
|
||||||
settings: "{{ states(settings_entity) | from_json }}"
|
settings: "{{ states(settings_entity) | from_json }}"
|
||||||
behavior: "{{ settings.behavior | default('adaptive_lighting') }}"
|
behavior: "{{ settings.behavior | default('adaptive_lighting') }}"
|
||||||
manual_control: "{{ settings.manual_control | default(false) }}"
|
manual_control: "{{ settings.manual_control | default(false) }}"
|
||||||
@@ -64,7 +62,12 @@ action:
|
|||||||
- service: adaptive_lighting.change_switch_settings
|
- service: adaptive_lighting.change_switch_settings
|
||||||
target:
|
target:
|
||||||
entity_id: "{{ al_switch }}"
|
entity_id: "{{ al_switch }}"
|
||||||
data: "{{ al_config | combine({'use_defaults': 'current'}) }}"
|
data: >
|
||||||
|
{% if 'use_defaults' not in al_config %}
|
||||||
|
{{ al_config | combine({'use_defaults': 'current'}) }}
|
||||||
|
{% else %}
|
||||||
|
{{ al_config }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
# Behavior: scene
|
# Behavior: scene
|
||||||
- conditions: "{{ behavior == 'scene' }}"
|
- conditions: "{{ behavior == 'scene' }}"
|
||||||
|
|||||||
@@ -13,7 +13,8 @@
|
|||||||
# Requirements:
|
# Requirements:
|
||||||
# - Inovelli Blue Dimmer (VZM31-SN) paired with Zigbee2MQTT
|
# - Inovelli Blue Dimmer (VZM31-SN) paired with Zigbee2MQTT
|
||||||
# - input_select helper with available modes
|
# - input_select helper with available modes
|
||||||
# - packages/adaptive_lighting_global.yaml for mode colors
|
# - Mode settings entities following convention: input_text.adaptive_lighting_settings_{{mode}}
|
||||||
|
# - Each mode must have led_color field in nested JSON schema
|
||||||
#
|
#
|
||||||
# Reference: ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md lines 144-182
|
# Reference: ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md lines 144-182
|
||||||
|
|
||||||
@@ -71,8 +72,9 @@ action:
|
|||||||
current_index: "{{ available_modes.index(current_mode) }}"
|
current_index: "{{ available_modes.index(current_mode) }}"
|
||||||
next_index: "{{ (current_index + 1) % (available_modes | length) }}"
|
next_index: "{{ (current_index + 1) % (available_modes | length) }}"
|
||||||
next_mode: "{{ available_modes[next_index] }}"
|
next_mode: "{{ available_modes[next_index] }}"
|
||||||
mode_colors: "{{ states('input_text.adaptive_lighting_mode_colors') | from_json }}"
|
next_mode_settings_entity: "input_text.adaptive_lighting_settings_{{ next_mode | lower | replace(' ', '_') }}"
|
||||||
next_color: "{{ mode_colors.get(next_mode, 170) }}"
|
next_mode_settings: "{{ states(next_mode_settings_entity) | from_json }}"
|
||||||
|
next_color: "{{ next_mode_settings.led_color | default(170) }}"
|
||||||
|
|
||||||
# Change to next mode
|
# Change to next mode
|
||||||
- service: input_select.select_option
|
- service: input_select.select_option
|
||||||
|
|||||||
@@ -2,47 +2,46 @@ blueprint:
|
|||||||
name: Weekend Mode Apply Settings
|
name: Weekend Mode Apply Settings
|
||||||
description: Adjust AL settings when weekend mode toggles
|
description: Adjust AL settings when weekend mode toggles
|
||||||
domain: automation
|
domain: automation
|
||||||
|
input:
|
||||||
|
weekend_mode_boolean:
|
||||||
|
name: Weekend Mode Boolean
|
||||||
|
description: Toggle helper for weekend mode
|
||||||
|
selector:
|
||||||
|
entity:
|
||||||
|
domain: input_boolean
|
||||||
|
|
||||||
input:
|
adaptive_lighting_switch:
|
||||||
weekend_mode_boolean:
|
name: Adaptive Lighting Switch
|
||||||
name: Weekend Mode Boolean
|
description: AL switch to adjust
|
||||||
description: Toggle helper for weekend mode
|
selector:
|
||||||
selector:
|
entity:
|
||||||
entity:
|
domain: switch
|
||||||
domain: input_boolean
|
integration: adaptive_lighting
|
||||||
|
|
||||||
adaptive_lighting_switch:
|
sunrise_time:
|
||||||
name: Adaptive Lighting Switch
|
name: Weekend Sunrise Time
|
||||||
description: AL switch to adjust
|
description: Delayed sunrise time for weekends
|
||||||
selector:
|
default: "10:00:00"
|
||||||
entity:
|
selector:
|
||||||
domain: switch
|
time:
|
||||||
integration: adaptive_lighting
|
|
||||||
|
|
||||||
sunrise_time:
|
sunset_time:
|
||||||
name: Weekend Sunrise Time
|
name: Weekend Sunset Time
|
||||||
description: Delayed sunrise time for weekends
|
description: Extended sunset time for weekends
|
||||||
default: "10:00:00"
|
default: "01:00:00"
|
||||||
selector:
|
selector:
|
||||||
time:
|
time:
|
||||||
|
|
||||||
sunset_time:
|
max_brightness:
|
||||||
name: Weekend Sunset Time
|
name: Weekend Max Brightness
|
||||||
description: Extended sunset time for weekends
|
description: Reduced max brightness for weekends
|
||||||
default: "01:00:00"
|
default: 60
|
||||||
selector:
|
selector:
|
||||||
time:
|
number:
|
||||||
|
min: 1
|
||||||
max_brightness:
|
max: 100
|
||||||
name: Weekend Max Brightness
|
step: 1
|
||||||
description: Reduced max brightness for weekends
|
unit_of_measurement: "%"
|
||||||
default: 60
|
|
||||||
selector:
|
|
||||||
number:
|
|
||||||
min: 1
|
|
||||||
max: 100
|
|
||||||
step: 1
|
|
||||||
unit_of_measurement: "%"
|
|
||||||
|
|
||||||
mode: restart
|
mode: restart
|
||||||
max_exceeded: silent
|
max_exceeded: silent
|
||||||
|
|||||||
@@ -2,21 +2,20 @@ blueprint:
|
|||||||
name: Weekend Mode Schedule
|
name: Weekend Mode Schedule
|
||||||
description: Auto-enable/disable weekend mode based on day of week
|
description: Auto-enable/disable weekend mode based on day of week
|
||||||
domain: automation
|
domain: automation
|
||||||
|
input:
|
||||||
|
weekend_mode_boolean:
|
||||||
|
name: Weekend Mode Boolean
|
||||||
|
description: Toggle helper for weekend mode
|
||||||
|
selector:
|
||||||
|
entity:
|
||||||
|
domain: input_boolean
|
||||||
|
|
||||||
input:
|
toggle_time:
|
||||||
weekend_mode_boolean:
|
name: Toggle Time
|
||||||
name: Weekend Mode Boolean
|
description: Time to check and toggle weekend mode
|
||||||
description: Toggle helper for weekend mode
|
default: "22:00:00"
|
||||||
selector:
|
selector:
|
||||||
entity:
|
time:
|
||||||
domain: input_boolean
|
|
||||||
|
|
||||||
toggle_time:
|
|
||||||
name: Toggle Time
|
|
||||||
description: Time to check and toggle weekend mode
|
|
||||||
default: "22:00:00"
|
|
||||||
selector:
|
|
||||||
time:
|
|
||||||
|
|
||||||
mode: single
|
mode: single
|
||||||
max_exceeded: silent
|
max_exceeded: silent
|
||||||
|
|||||||
Reference in New Issue
Block a user