Add data-driven blueprint architecture for adaptive lighting modes
Implement three core blueprints using convention-based entity lookup:
- apply_lighting_mode: Dynamic mode application with behavior polymorphism
- weekend_mode_schedule: Auto-enable/disable based on day of week
- weekend_mode_apply_settings: Apply AL adjustments for weekends
Blueprints use convention over configuration, allowing unlimited custom
modes without code changes. Modes discovered via naming pattern:
input_text.adaptive_lighting_settings_{{mode}}
This commit is contained in:
46
blueprints/automation/weekend_mode_schedule.yaml
Normal file
46
blueprints/automation/weekend_mode_schedule.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
blueprint:
|
||||
name: Weekend Mode Schedule
|
||||
description: Auto-enable/disable weekend mode based on day of week
|
||||
domain: automation
|
||||
|
||||
input:
|
||||
weekend_mode_boolean:
|
||||
name: Weekend Mode Boolean
|
||||
description: Toggle helper for weekend mode
|
||||
selector:
|
||||
entity:
|
||||
domain: input_boolean
|
||||
|
||||
toggle_time:
|
||||
name: Toggle Time
|
||||
description: Time to check and toggle weekend mode
|
||||
default: "22:00:00"
|
||||
selector:
|
||||
time:
|
||||
|
||||
mode: single
|
||||
max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
- platform: time
|
||||
at: !input toggle_time
|
||||
|
||||
action:
|
||||
- choose:
|
||||
# Friday/Saturday - Enable weekend mode
|
||||
- conditions:
|
||||
- condition: time
|
||||
weekday: [fri, sat]
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: !input weekend_mode_boolean
|
||||
|
||||
# Sunday-Thursday - Disable weekend mode
|
||||
- conditions:
|
||||
- condition: time
|
||||
weekday: [sun, mon, tue, wed, thu]
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: !input weekend_mode_boolean
|
||||
Reference in New Issue
Block a user